Nagios 里面监控MySQL 监控事务夯住(RUNNING)报警通知(二)

2015-01-21 12:14:03 · 作者: · 浏览: 9
check一下
[root@localhost etc]# /usr/local/nagios/libexec/check_nrpe -H10.254.3.61 -c check_mysql_trx
OK- TRANSACTIONS RAN successfully.
[root@localhost etc]#


在services.cfg里面添加事务监控选项:
define service{
? ? ? ? host_name? ? ? ? ? ? ? mysqlserver
? ? ? ? service_description? ? Check mysql transctions
? ? ? ? check_command? ? ? ? ? check_nrpe!check_mysql_trx
? ? ? ? max_check_attempts? ? ? 5
? ? ? ? check_command? ? ? ? ? check_nrpe!check_mysql_trx
? ? ? ? max_check_attempts? ? ? 5
? ? ? ? normal_check_interval? 3
? ? ? ? retry_check_interval? ? 2
? ? ? ? check_period? ? ? ? ? ? 24x7
? ? ? ? notification_interval? 10
? ? ? ? notification_period? ? 24x7
? ? ? ? notification_options? ? w,u,c,r
? ? ? ? contact_groups? ? ? ? ? opsweb
? ? ? ? }


在commands.cnf里面添加事务监控命令:
# add by tim.man on 20141201
define command{
? ? ? ? command_name? ? check_mysql_trx
? ? ? ? command_line? ? $USER1$/check_mysql_trx -w $ARG1$ -c $ARG2$
? ? ? ? }


邮件短信报警电话报警已经添加,所以无需重新配置。


然后重新加载nagios
[root@localhost objects]# service nagios reload
Running configuration check...
Reloading nagios configuration...
done
[root@localhost objects]#


5,去nagios主监控界面查看监控效果


正常监控效果:


Nagios 里面监控MySQL 监控事务夯住(RUNNING)报警通知


严重监控效果:


Nagios 里面监控MySQL 监控事务夯住(RUNNING)报警通知