Custom command, works from command line, not from nagios?

Leif J. nagios at ljnet.dk
Sat Jan 8 14:40:30 CET 2011


I'm confused in CLI you are using:

/usr/lib/nagios/plugins/check_nrpe -H client.localdomain
-c get_disk -a localhost C: 70,80

but in the define command you are using:

$USER1$/get_disk -a  $HOSTADDRESS$ C: 70,80



In your define command I would define it as:

/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c get_disk -a localhost C: 70,80


And then define the command in nrpe on the windows box


Den 08-01-2011 14:22, Mister IT Guru skrev:
> I run this command from the cli
>
> [root at host ~]# /usr/lib/nagios/plugins/check_nrpe -H client.localdomain
> -c get_disk -a localhost C: 70,80
>
> OK - C: 'Percentage Space Used' = 54; |'C'=54;70;80;
>
> And I get the response above. I defined the command below,
>
> define command{
>           command_name    check_cdrive
>           command_line    $USER1$/get_disk -a  $HOSTADDRESS$ C: 70,80
>           }
>
> and also this service,
>
> define service{
>
>       use        generic-service        ; Inherit default values from a
> template
>       hostgroup_name        Windows_Servers
>       service_description    C Drive Space
>       check_command    check_cdrive
>       }
>
> And I get this response when nagios runs the checks.
>
> Status Information:    (Return code of 127 is out of bounds - plugin may
> be missing)
>
>
> The target client is a windows box, running nrpe_nt -
>
> Any ideas, as to where I'm going wrong, are appreciated :)
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any company
> that requires sensitive data to be transmitted over the Web.   Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list