nagios/nrpe caching result

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
digihorse
Posts: 1
Joined: Mon Aug 12, 2013 3:09 pm

nagios/nrpe caching result

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios/nrpe caching result

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked