Set exit code


Not sure if this is an issue with me, nsclient, or Opsview. This throws an “Unknown” exit code(3) even with empty-state set to critical. I want a critical if no services are found.

Anyone know how to throw a critical exit code from this, it exits as code 3, “Unknown”?? check_service -a “empty-state=‘critical’” “empty-syntax=‘Critical: No Services found’” "filter= (name LIKE ‘TPP.’) and start_type=‘auto’ "


I figured this one out. Quoting drives me crazy with Opsview/NSClient. Here is the solution.

check_nrpe -H $HOSTADDRESS$ -c check_service -a "empty-state=critical" "empty-syntax=CRITICAL: No Services found matching filter." "filter= (name LIKE 'TPP.') and start_type='auto' "