I am fighting with the check_service command syntax and hope you can help me get over this hurdle. Long story short, I was previously using the command syntax below, but found that the crit value would not return a stopped service with an Automatic (delayed) startup as a Critical alarm, but rather as a Warning. This is no good.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H NCHISIAPM002 -u -t 30 -c check_service -a "filter=name like 'DBTuna'" 'crit=not state_is_ok()'
Through trial and error, I found changing the crit value to
"crit=state= 'stopped'" would throw a Critical alarm for any stopped service I defined and as a bonus added perfdata to the check. Awesome. Except... I can't get it working with this specific check. I think the filter is fighting with the new crit value, but I can't get the logs to tell me why. Maybe I'm not looking at the right logs. I've been mainly focusing on the NSClient logs.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H NCHISIAPM002 -u -t 30 -c check_service -a "filter=name like 'DBTuna'" "crit=state= 'stopped'"
Reply from Nagios
Code: Select all
CHECK_NRPE: Invalid packet type received from server.
Here's an example of a check that is working properly with similar syntax
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H VCHAPP004 -u -t 30 -c check_service -a "filter=start_type = 'auto' and (name like 'Availability' or name like 'RDT' or name in ('SendLeads', 'VaultWareReports'))" "crit=state= 'stopped'"
Any ideas?
Thanks!