当前位置:Gxlcms > 数据库问题 > icinga2 check_mysql_health插件

icinga2 check_mysql_health插件

时间:2021-07-01 10:21:17 帮助过:13人阅读


icinga2 check_mysql_health插件


https://labs.consol.de/nagios/check_mysql_health/


# tar zxfv check_mysql_health-2.2.2.tar.gz

# cd check_mysql_health-2.2.2

# ./configure

# make

# make install

# cp -rv /usr/local/nagios/libexec/check_mysql_health /usr/lib64/nagios/plugins/

# chmod +x /usr/lib64/nagios/plugins/check_mysql_health


编译生成的check_mysql_health可以直接给其它服务器用,不需要再编译生成


抓取mysql连接数:


# /usr/lib64/nagios/plugins/check_mysql_health --hostname 127.0.0.1 --username iccheck --password xxxxxx --mode threads-connected --warning 1000 --critical 2000


写到/etc/nagios/nrpe.cfg


# vi /etc/nagios/nrpe.cfg


command[check_mysql_C]=sudo  /usr/lib64/nagios/plugins/check_mysql_health --hostname 127.0.0.1 --username iccheck --password xxxxx --mode threads-connected --warning 1000 --critical 2000


:wq



# service nrpe restart  (Ubuntu是service nagios-npre-server restart)



icinga2配置略




本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1977836

icinga2 check_mysql_health插件

标签:check   mysql   health   

人气教程排行