我读了一篇关于Percona监控插件的博客文章,以及你如何使用pmp-check-mysql-status插件来监控Galera集群。下面是该博客的链接,说明:
本教程中的命令在命令行上运行。我希望在Nagios .cfg文件中尝试这些命令,例如,monitor.cfg。如何为本教程中使用的命令编写服务?
这是我的尝试,我无法确定check_command在服务上使用的最佳参数。我怀疑问题出在哪里。
因此,在我的/etc/nagios3 3/conf.d.d/nanor.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 发布于 2015-08-21 19:10:42
您验证了:/usr/lib/nagios/plugins/pmp-check-mysql-status -x wsrep_cluster_status -C == -T str -c non-Primary在目标主机的命令行上工作得很好吗?我怀疑==有一个外壳转义问题
这对你有用吗?/usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_flow_control_paused -w 0.1 -c 0.9
https://stackoverflow.com/questions/32136633
复制相似问题