Page 2 of 2

Re: Getting Invalid Output On Nagios

Posted: Wed May 13, 2015 4:46 pm
by Box293
rlinux57 wrote:Still getting error.

I have define command in nagios server as:

Code: Select all

define command{
        command_name    check_testaccounts
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_testaccounts $ARG1$  $ARG2$
        }
You did not read this important bit of information in my last post:
Box293 wrote:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -c check_testaccounts -H spelljob.com -a 1 2
NOTE: To send arguments you must use the -a flag.
So your command definition needs to be:

Code: Select all

define command{
        command_name    check_testaccounts
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_testaccounts -a $ARG1$ $ARG2$
        }

Re: Getting Invalid Output On Nagios

Posted: Fri May 15, 2015 8:18 am
by rlinux57
I have sort out this problem by adding "/usr/bin/sudo" before command definition in nrpe.cfg on remote host.