2:mysql主从监控
grant replication client on *.* to 'zabbix'@'localhost'; #为zabbix账户授权
mysql -uzabbix -e 'show slavestatus\G' |grep –E "Slave_IO_Running|Slave_SQL_Running"|awk '{print$2}'|grep -c Yes
#当值为2的时候表示mysql的主从是正常的当值为0的时候表示的是不正常的
一些Zabbix相关教程集合: