Custom command, works from command line, not from nagios?
Clyde Jones
cjones at exelixis.com
Thu Jan 13 19:30:19 CET 2011
Mister IT Guru <mailto:misteritguru at gmx.com> wrote:
> 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
>
> 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)
>
>
You are asking Nagios to run a non-existing command. What you have
defined in the nagios command is NOT what you ran on the command line.
Your command should be:
define command{
command_name check_cdrive
# Wrong command_line $USER1$/get_disk -a $HOSTADDRESS$ C: 70,80
command_line $USER1$/check_nrpe $HOSTADDRESS$ -c
get_disk -a localhost C: 70,80
}
--
Clyde Jones
R&D Informatics
Senior Applications Engineer
cjones at exelixis.com
Exelixis Inc
650 837 7085 Office
650 228 4699 Cell
This email (including any attachments) may contain material
that is confidential and privileged and is for the sole use of
the intended recipient. Any review, reliance or distribution by
others or forwarding without express permission is strictly
prohibited. If you are not the intended recipient, please
contact the sender and delete all copies.
Exelixis, Inc. reserves the right, to the extent and under
circumstances permitted by applicable law, to retain, monitor
and intercept e-mail messages to and from its systems.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
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