Page 1 of 1

nagios/nrpe caching result

Posted: Wed Aug 14, 2013 6:53 pm
by digihorse
I am testing the VM of the NagiosXI. So far ok. Am working with the the check_nrpe plugin, and the script check_init_service to test for the pid of an init.d service on remote host. from the NagiosIX VM, command returns, with a PID number the first time. Great. However, subsequent testing shows that this result never changes, regardless of whether the service is up, down, changed PID, nothing. Same result, whether in the Web interface or on the command line. Running the check_init_service on the subject system yields expected results with an updated status message dependent on the true status of that service.

I've also tested this with a fresh Nagios install on OpenSuSE 12.3 and get the same cached remote result with the incorrect stale PID. Remote system is Ubuntu 13.04 with the NRPE installed via apt-get install nagios-nrpe-server. Have been through every setting, and can find nothing to change this remote behavior.

Any ideas?

Re: nagios/nrpe caching result

Posted: Thu Aug 15, 2013 10:14 am
by lmiltchev
Run the "check_init_service" check locally on the remote machine, both as root, and as nagios user, and show us the output. For example:

Code: Select all

./check_init_service httpd
su - nagios -c 'sudo /usr/local/nagios/libexec/check_init_service httpd'
Show us the "check_init_service" command definition on the remote box.

Did you add "check_init_service" to the sudoers file? Example:

Code: Select all

# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
I've also tested this with a fresh Nagios install on OpenSuSE 12.3...
OpenSuSE is NOT a supported distribution:
http://support.nagios.com/wiki/index.ph ... tributions