如何在 NRPE 客户端上向 Percona MySQL 插件的 nrpe.cfg 添加命令?

如何在 NRPE 客户端上向 Percona MySQL 插件的 nrpe.cfg 添加命令?

如何nrpe.cfg在 NRPE 客户端上向 Percona MySQL 插件添加命令?

To configure percona-nrpe plugins for mysql you will have to do 3 things viz : 
1. define commands in command.cfg
2. Define service in service.cfg
3. Add commands on client to nrpe.cfg

前两个可以轻松完成以获得帮助http://kedar.nitty-witty.com/blog/install-percona-monitoring-tools-for-nagios-mysql-plugins#comment-43181

我发现关于第三点(即如何在客户端的 nrpe.cfg 中添加命令)的帮助较少。那么有人能告诉我如何在客户端的 nrpe.cfg 中添加命令吗?

答案1

要为 mysql 配置 percona-nrpe 插件,你必须做 3 件事:1. 定义命令 2. 定义服务 3. 将客户端上的命令添加到 nrpe.cfg

前两个可以轻松完成,以获取帮助参考http://kedar.nitty-witty.com/blog/install-percona-monitoring-tools-for-nagios-mysql-plugins#comment-43181

我发现对于第三点(即在客户端的 nrpe.cfg 中添加命令)可用的帮助较少,所以这里是 percona-mysql 插件的示例 nrpe.cfg!

command[check_mysql_service]=/usr/local/nagios/libexec/check_mysqld.pl -H 192.168.1.68 -u root -p xx -a slow_queries -w 44 -c 55 

command[check_mysql_innodb]=/usr/local/nagios/libexec/pmp-check-mysql-innodb -H 192.168.1.68 -C idle_blocker_duration -w 60 -c 600

command[check_mysql_innodb]=/usr/local/nagios/libexec/pmp-check-mysql-innodb -H 192.168.1.68 -C max_duration -w 86400 -c 172800

command[check_mysql_active_threads]=/usr/lib64/nagios/plugins/pmp-check-mysql-status -H 192.168.1.68 -x Threads_running -w 20 -c 40

command[rdba_mysql_pidfile]=/usr/lib64/nagios/plugins/pmp-check-mysql-pidfile

command[rdba_unix_memory]=/usr/lib64/nagios/plugins/pmp-check-unix-memory -d -w 96 -c 98

command[check_mysql_deadlocks]=/usr/lib64/nagios/plugins/pmp-check-mysql-deadlocks -H 192.168.1.68 -i 5 -w 12 -c 60

command[check_mysql_connections]=/usr/lib64/nagios/plugins/pmp-check-mysql-status -H 192.168.1.68 -x Threads_connected -o / -y max_connections -T pct -w 80 -c 95

command[check_mysql_replication_delay]=/usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay -H 192.168.1.68 -w 650 -c 600

command[check_mysql_processlist]=/usr/local/nagios/libexec/pmp-check-mysql-processlist -H 192.168.1.68 -w 80 -c 100

command[check_mysql_replication_running]=/usr/local/nagios/libexec/pmp-check-mysql-replication-running -H 192.168.1.68

相关内容