Can't get NRPE syntax right for CheckProcState

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Can't get NRPE syntax right for CheckProcState

Post 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
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't get NRPE syntax right for CheckProcState

Post 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
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Can't get NRPE syntax right for CheckProcState

Post by jsmurphy »

Glad you found a solution, cheers for posting it Joe.
Locked