NRPE Issue
Posted: Thu May 24, 2012 3:33 am
Hi All.
Running a Nagios server with verious clients running the NRPE plugin. I have a script for checking mysql replication. If I run it direct from the main Nagios server /usr/lib/nagios/plugins/check_nrpe -H monitored.com -c check_mysql NRPE: Unable to read output
If you run the following command from the host /usr/local/nagios/libexec/check-mysql-slave.pl
OK - Waiting for master to send event, replicating host xx.xx.xx.xx:3306
This is what is in the client nrpe.cfg command[check_sql]=/usr/local/nagios/libexec/check-mysql-slave.pl
This in on the nagios server
define service{
use generic-service
host_name server102.xxxxxx.co.uk
service_description # SQL replication
#contact_groups ux-admins, noc-op
check_command check_nrpe!check_sql
}
I have a similar script running for a memory check which did not work until I installed apt-get install bc on the Ubuntu box, although I did not see any errors in the syslog. Just wondering if I need something installed along these lines for it to be seen.
This is the debug details
May 24 09:21:44 slave nrpe[25294]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
May 24 09:21:44 slave nrpe[25294]: Handling the connection...
May 24 09:21:44 slave nrpe[25294]: Host is asking for command 'check_sql' to be run...
May 24 09:21:44 slave nrpe[25294]: Running command: /usr/local/nagios/libexec/check-mysql-slave.pl
May 24 09:21:44 slave nrpe[25294]: Command completed with return code 3 and output:
May 24 09:21:44 slave nrpe[25294]: Return Code: 3, Output: NRPE: Unable to read output
The file has the correct permissions and owner. Am a little confused where I may be going wrong here. Can anyone advise me
Running a Nagios server with verious clients running the NRPE plugin. I have a script for checking mysql replication. If I run it direct from the main Nagios server /usr/lib/nagios/plugins/check_nrpe -H monitored.com -c check_mysql NRPE: Unable to read output
If you run the following command from the host /usr/local/nagios/libexec/check-mysql-slave.pl
OK - Waiting for master to send event, replicating host xx.xx.xx.xx:3306
This is what is in the client nrpe.cfg command[check_sql]=/usr/local/nagios/libexec/check-mysql-slave.pl
This in on the nagios server
define service{
use generic-service
host_name server102.xxxxxx.co.uk
service_description # SQL replication
#contact_groups ux-admins, noc-op
check_command check_nrpe!check_sql
}
I have a similar script running for a memory check which did not work until I installed apt-get install bc on the Ubuntu box, although I did not see any errors in the syslog. Just wondering if I need something installed along these lines for it to be seen.
This is the debug details
May 24 09:21:44 slave nrpe[25294]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
May 24 09:21:44 slave nrpe[25294]: Handling the connection...
May 24 09:21:44 slave nrpe[25294]: Host is asking for command 'check_sql' to be run...
May 24 09:21:44 slave nrpe[25294]: Running command: /usr/local/nagios/libexec/check-mysql-slave.pl
May 24 09:21:44 slave nrpe[25294]: Command completed with return code 3 and output:
May 24 09:21:44 slave nrpe[25294]: Return Code: 3, Output: NRPE: Unable to read output
The file has the correct permissions and owner. Am a little confused where I may be going wrong here. Can anyone advise me