Re: [Nagios-users] Custom command, works from command line, not from nagios?

2011-01-13 Thread Clyde Jones
Mister IT Guru  wrote:
> I run this command from the cli
> 
> [root@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_namecheck_cdrive
>  command_line$USER1$/get_disk -a  $HOSTADDRESS$ C: 70,80

> } 
> 
> and also this service,
> 
> define service{
> 
>  usegeneric-service; Inherit default
> values from a
> template
>  hostgroup_nameWindows_Servers
>  service_descriptionC Drive Space
>  check_commandcheck_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_namecheck_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
cjo...@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@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


Re: [Nagios-users] Custom command, works from command line, not from nagios? [SOLVED]

2011-01-10 Thread Mister IT Guru
On 08/01/2011 14:09, Leif J. wrote:
> Den 08-01-2011 14:51, Mister IT Guru skrev:
>> On 08/01/2011 13:40, Leif J. wrote:
>>> 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
>>>
>> I had no idea that I could do that!? I feel so stupid! Thanks for the tip!
> I always take the exactly path to make sure what command it are using.

By using the absolute path, I was able to get everything working, Thank 
you :)

-- 
The Solo System Admin
http://solosysad.blogspot.com/
--
Mister IT Guru At Gmx Dot Com


--
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@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


Re: [Nagios-users] Custom command, works from command line, not from nagios?

2011-01-08 Thread Leif J.
Den 08-01-2011 14:51, Mister IT Guru skrev:
> On 08/01/2011 13:40, Leif J. wrote:
>> 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
>>
> I had no idea that I could do that!? I feel so stupid! Thanks for the tip!

I always take the exactly path to make sure what command it are using.

--
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@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


Re: [Nagios-users] Custom command, works from command line, not from nagios?

2011-01-08 Thread Mister IT Guru
On 08/01/2011 13:40, Leif J. wrote:
> 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
>
I had no idea that I could do that!? I feel so stupid! Thanks for the tip!

--
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@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


Re: [Nagios-users] Custom command, works from command line, not from nagios?

2011-01-08 Thread Leif J.
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
>
> [r...@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_namecheck_cdrive
>   command_line$USER1$/get_disk -a  $HOSTADDRESS$ C: 70,80
>   }
>
> and also this service,
>
> define service{
>
>   usegeneric-service; Inherit default values from a
> template
>   hostgroup_nameWindows_Servers
>   service_descriptionC Drive Space
>   check_commandcheck_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@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@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


[Nagios-users] Custom command, works from command line, not from nagios?

2011-01-08 Thread Mister IT Guru
I run this command from the cli

[r...@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_namecheck_cdrive
 command_line$USER1$/get_disk -a  $HOSTADDRESS$ C: 70,80
 }

and also this service,

define service{

 usegeneric-service; Inherit default values from a 
template
 hostgroup_nameWindows_Servers
 service_descriptionC Drive Space
 check_commandcheck_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@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