Page 1 of 1

Nagios Percona Monitoring Plugin

Posted: Fri Jun 17, 2022 1:19 am
by DennisSSebasiStephen
I was reading a blog post on Percona Monitoring Plugins and how you can somehow monitor a Galera cluster using pmp-check-mysql-status plugin. Below is the link to the blog demonstrating that:

https://www.percona.com/blog/2013/10/31 ... g-plugins/

The commands in this tutorial are run on the command line. I wish to try these commands in a Nagios .cfg file e.g, monitor.cfg. How do i write the services for the commands used in this tutorial?

This was my attempt and i cannot figure out what the best parameters to use for check_command on the service. I am suspecting that where the problem is.

So inside my /etc/nagios3/conf.d/monitor.cfg file, i have the following:

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
}
When i run the command Nagios and go to monitor it, i get this message in the Nagios dashboard:

status: UNKNOWN; /usr/lib/nagios/plugins/pmp-check-mysql-status: 31:
shift: can't shift that many