[英]Nagios Percona Monitoring Plugin
我正在阅读有关Percona监视插件的博客文章,以及如何使用pmp-check-mysql-status插件监视Galera集群。 以下是表明该博客的链接:
本教程中的命令在命令行上运行。 我希望在Nagios .cfg文件(例如monitor.cfg)中尝试这些命令。 如何为本教程中使用的命令编写服务?
这是我的尝试,我无法确定在服务上使用check_command的最佳参数是什么。 我怀疑问题出在哪里。
因此,在我的/etc/nagios3/conf.d/monitor.cfg文件中,我具有以下内容:
define host{
use generic-host
host_name percona-server
alias percona
address 127.0.0.1
}
## Check for a Primary Cluster
define command{
command_name check_mysql_status
command_line /usr/lib/nagios/plugins/pmp-check-
mysql-status -x wsrep_cluster_status -C == -T str -c non-Primary
}
define service{
use generic-service
hostgroup_name mysql-servers
service_description Cluster
check_command pmp-check-mysql-
status!wsrep_cluster_status!==!str!non-Primary
}
当我运行命令Nagios并对其进行监视时,我在Nagios仪表板中收到以下消息:
status: UNKNOWN; /usr/lib/nagios/plugins/pmp-check-mysql-status: 31:
shift: can't shift that many
您已验证: /usr/lib/nagios/plugins/pmp-check-mysql-status -x wsrep_cluster_status -C == -T str -c non-Primary
在目标主机上的命令行上工作正常吗? 我怀疑==存在shell逃逸问题
这对您有用吗? /usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_flow_control_paused -w 0.1 -c 0.9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.