nagios script quits with unknown error

Keles, Cem Cem.Keles at eu.sony.com
Tue Oct 9 11:46:59 CEST 2007


Hi again,

Sorry about not writing these in the previous email.

Yes, the values are correct in script.

 

KR,

Cem

 

________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of hindrek
murdsalu
Sent: Tuesday, October 09, 2007 11:25 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] nagios script quits with unknown error

 

Are you using the appropriate return codes?

Const intCritical = 2

Const intWarning = 1

Const intOK = 0

Const intUnknown = 3

 

________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Keles,
Cem
Sent: 9. oktoober 2007. a. 10:57
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] nagios script quits with unknown error

 

 

Hi,

I use Nagios 2.9.

I have a vbscript running on windows servers that checks the cpu usage
and outputs with performance data.

Here is the output of script when executed on command prompt.

Processor Time=41% |PerProc=41;60;90;0;100

 

The last lines of script are like this:

If PercentProcessorTime > warnperc Then

if PercentProcessorTime > critperc Then

    Wscript.Quit(2) 'Quit with critical

Else

    Wscript.Quit(1) 'Quit with warning

End If

End If

Wscript.Quit(0) 'Quit with OK

 

So the script quits with warning or critical if those criterias in if
statements are met and sure it should at least quit with ok.

But most of the time I get these notifications from nagios.

------------------------------------------------------------------

***** Nagios *****

 

Notification Type: PROBLEM

 

Service: CPU load

Host: hostname

Address: xx.xx.xx.xx

State: UNKNOWN

 

Date/Time: Tue Oct 9 09:25:10 CEST 2007

 

Additional Info:

 

Processor Time=52%

-------------------------------------------------------------------

 

You see the output is ok, that it gives Processor Time=52%.

 

My question is: Why do you think nagios gives unknown even script
executes well?

 

Any help will be greatly appreciated.

 

KR,

Cem


************************************************************************
The information contained in this message or any of its attachments may
be confidential and is intended for the exclusive use of the
addressee(s). Any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
without the express permission of the sender. The views expressed in
this email are those of the individual and not necessarily those of Sony
or Sony affiliated companies. Sony email is for business use only.

This email and any response may be monitored by Sony to be in compliance
with Sony's global policies and standards


************************************************************************
The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s).  Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender.  The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies.  Sony email is for business use only.

This email and any response may be monitored by Sony to be in compliance with Sony’s global policies and standards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071009/be99c048/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
-------------- next part --------------
_______________________________________________
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