Process Check Never Goes Critical

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jimmlegs
Posts: 49
Joined: Thu Jun 20, 2013 11:50 am

Process Check Never Goes Critical

Post by jimmlegs »

I am trying to check if either of two processes are running and if neither are to go critical. I appear to have all of the pieces but Nagios XI never sends a notification and appears to be in a warning state even though it says "CRITICAL: No processes found". It does recover with an OK state when it detects one of the two processes which is the correct behavior, I just need help with the critical status and notification. I am using the following syntax:

./check_nrpe -H $HOSTNAME$ -c check_process "top-syntax=%(list):%(count)" "detail-syntax=%(exe):%(state)" -a "filter=state='stopped' and exe eq 'MsSenseS.exe' or exe eq 'ccSvcHst.exe'"

Thank you in advance for any assistance.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Process Check Never Goes Critical

Post by ssax »

If you pass show-default to nsclient it can help in cases like these (I've modified yours since yours isn't the proper format):

Code: Select all

./check_nrpe -H X.X.X.X -c check_process -a "filter=state='stopped' and exe eq 'MsSenseS.exe' or exe eq 'ccSvcHst.exe'" "top-syntax=%(list):%(count)" "detail-syntax=%(exe):%(state)" show-default
"filter=state != 'unreadable'" "warning=state not in ('started')" "critical=state = 'stopped', count = 0" "empty-state=unknown" "top-syntax=${status}: ${problem_list}" "ok-syntax=%(status): all processes are ok." "empty-syntax=UNKNOWN: No processes found" "detail-syntax=${exe}=${state}" "perf-syntax=${exe}"
So you would want to use this:

Code: Select all

./check_nrpe -H X.X.X.X -c check_process -a "filter=state='stopped' and exe eq 'MsSenseS.exe' or exe eq 'ccSvcHst.exe'" "top-syntax=%(list):%(count)" "detail-syntax=%(exe):%(state)" "empty-state=critical" "empty-syntax=CRITICAL: No processes found"
jimmlegs
Posts: 49
Joined: Thu Jun 20, 2013 11:50 am

Re: Process Check Never Goes Critical

Post by jimmlegs »

Thanks, that did the trick! You can close
Locked