icinga2 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配置略




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章