I have set up NRPE monitoring between 2 hosts. I can test it by running this on the command line.
#/usr/local/nagios/libexec/check_nrpe -H myhost -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
That returns data but when I've added the same host as part of a service, I am getting (null) return codes. See additional Info for debug
I compiled these plugins successfully and had no issues so I am not sure where the issue lies and connectivity is proved by running it successfully on the command line.
I have seen a few solutions that were to do with the library files but these are standard plugins. Please help.
OS - RHEL 5.4
My Debug output.
[1294739885.199641] [016.0] [pid=12714] Attempting to run scheduled check of service 'CPU Load' on host 'myhost': check options=0, latency=0.199000
[1294739885.199668] [016.0] [pid=12714] Checking service 'CPU Load' on host 'myhost'...
[1294739885.199789] [016.1] [pid=12714] Check result output will be written to '/usr/local/nagios/var/spool/checkresults/checkTcznVs' (fd=7)
[1294739892.229729] [016.0] [pid=12714] Starting to reap check results.
[1294739892.229774] [016.1] [pid=12714] Starting to read check result queue '/usr/local/nagios/var/spool/checkresults'...
[1294739892.229810] [016.1] [pid=12714] Processing check result file: '/usr/local/nagios/var/spool/checkresults/cGfk49P'
[1294739892.229930] [016.1] [pid=12714] Handling check result for service 'CPU Load' on host 'myhost'...
[1294739892.229937] [016.0] [pid=12714] ** Handling check result for service 'CPU Load' on host 'myhost'...
[1294739892.229943] [016.1] [pid=12714] HOST: myhost, SERVICE: CPU Load, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 2, OUTPUT: (null)
[1294739892.229956] [016.1] [pid=12714] Service is in a non-OK state!
[1294739892.229962] [016.1] [pid=12714] Host is currently UP, so we'll recheck its state to make sure...
[1294739892.229970] [016.1] [pid=12714] * Using last known host state: 0
[1294739892.229975] [016.1] [pid=12714] Current/Max Attempt(s): 5/5
[1294739892.229980] [016.1] [pid=12714] Service has reached max number of rechecks, so we'll handle the error...
[1294739892.229984] [016.1] [pid=12714] Checking service 'CPU Load' on host 'myhost' for flapping...
[1294739892.229990] [016.1] [pid=12714] Checking host 'myhost' for flapping...
[1294739892.229997] [016.1] [pid=12714] Host is not flapping (0.00% state change).
[1294739892.230034] [016.1] [pid=12714] Rescheduling next check of service at Tue Jan 11 10:03:05 2011
[1294739892.230050] [016.0] [pid=12714] Scheduling a non-forced, active check of service 'CPU Load' on host 'myhost' @ Tue Jan 11 10:03:05 2011
[1294739892.230071] [016.1] [pid=12714] Deleted check result file '/usr/local/nagios/var/spool/checkresults/cGfk49P'
[1294739892.230085] [016.0] [pid=12714] Finished reaping 1 check results