Getting Invalid Output On Nagios

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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Getting Invalid Output On Nagios

Post 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$
        }
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Getting Invalid Output On Nagios

Post by rlinux57 »

I have sort out this problem by adding "/usr/bin/sudo" before command definition in nrpe.cfg on remote host.
Locked