zoukankan      html  css  js  c++  java
  • Zabbix自带的mysql监控模块

    Zabbix自带的mysql监控模块

    [root@Cagios zabbix-2.2.10]# cp conf/zabbix_agentd/userparameter_mysql.conf /usr/local/zabbix/etc/zabbix_agentd.conf.d/
    [root@Cagios zabbix-2.2.10]# cd /usr/local/zabbix/etc/zabbix_agentd.conf.d/
    
    [root@Cagios zabbix_agentd.conf.d]# vi userparameter_mysql.conf 
    UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | mysql -u zabbix_user -pzabbix_passwd -N | awk '{print $$2}'
    UserParameter=mysql.size[*],echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free
    ";; esac)) from information_schema.tables$([[ "$1" = "all" || ! "$1" ]] || echo " where table_schema='$1'")$([[ "$2" = "all" || ! "$2" ]] || echo "and tabl
    e_name='$2'");" | mysql -u zabbix_user -pzabbix_passwd -N
    
    UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin -uzabbix_user -pzabbix_passwd ping | grep -c alive
    UserParameter=mysql.version,mysql -V
    
    [root@Cagios ~]# vi /etc/zabbix/zabbix_agentd.conf
    Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
    
    [root@Cagios ~]# /etc/init.d/zabbix_agentd restart

  • 相关阅读:
    pdf-2-eps
    使用terminator
    自动删除源文件中的指定行--sed
    apt-get update只是更新源列表?
    LoadRunner学习
    计算一个人从出生到目前一共生活了多少天
    数组的求交集和并集
    获取北京和张北的天气
    重新梳理java入门
    java 基础
  • 原文地址:https://www.cnblogs.com/caoguo/p/5025435.html
Copyright © 2011-2022 走看看