Page 1 of 1

Can't get NRPE syntax right for CheckProcState

Posted: Wed Jun 20, 2012 4:35 pm
by jbruyet
Hey all, I'm trying to get NRPE to monitor three processes for one of my servers but not having much luck. When I run Nagios I get the following error message:

ERROR: Missing argument exception.

I've tried four different syntax variations in my service definitions:

Code: Select all

check_command           check_nrpe!CheckProcState mobiledata.exe=started CRITICAL: mobiledata.exe : Stopped
check_command           check_nrpe!CheckProcState CRITICAL: mobiledata.exe : Stopped  OK: mobiledata.exe :  running
check_command           check_nrpe!CheckProcState mobiledata.exe : Stopped  OK: mobiledata.exe : running
check_command           check_nrpe!CheckProcState ShowAll mobiledata.exe=started OK: mobiledata.exe :   Running
Using this as my Command definition:

Code: Select all

# 'CheckProcState' command definition
define command {
        command_name CheckProcState
        command_line check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckProcState -a $ARG1$=stopped $ARG2$=started
        }
I'm basing my service definitions on what I see here: http://www.nsclient.org/nscp/wiki/CheckProcState

Can anyone see what I'm doing wrong?

Thanks,

Joe B

Re: Can't get NRPE syntax right for CheckProcState

Posted: Wed Jun 20, 2012 5:38 pm
by jbruyet
FOUND IT!!! I was missing a "-a" in front of the ShowAll parameter. I was even able to shrink the command down to:

Code: Select all

        check_command           check_nrpe!CheckProcState -a ShowAll mobiledata.exe=started
Onward and upward.

Thanks,

Joe B

Re: Can't get NRPE syntax right for CheckProcState

Posted: Wed Jun 20, 2012 6:18 pm
by jsmurphy
Glad you found a solution, cheers for posting it Joe.