码迷,mamicode.com
首页 > 数据库 > 详细

icinga2 check_mysql_health插件

时间:2017-10-31 23:47:35      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:check   mysql   health   


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   

原文地址:http://yangzhiming.blog.51cto.com/4849999/1977836

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!