Script returns "No Output"

Janet Post Janet.Post at excapsa.ca
Tue Nov 7 14:21:22 CET 2006


WOW!!!

Thanks Patrick!  I will definitely use this tool!

(and I fixed the -1 thing.  Good catch.)



-----Original Message-----
From: Patrick Proy [mailto:nagios-user at proy.org] 
Sent: November 6, 2006 4:19 PM
To: Janet Post; 'Sloane, Robert Raymond'; 'Nagios Users Mailing List'
Subject: RE: [Nagios-users] Script returns "No Output"

Hi,

It just means that embeded perl doesn't support your script. You can use the
"mini_epn" utility found in the /contrib directory of Nagios to test it : 

# ./mini_epn 
Enter file name: check_apache.pl
embedded perl ran check_apache.pl with error Variable "$url" is not imported
at (eval 2) line 149.
        ...propagated at (eval 1) line 110.


You must use "use strict" option and check your script works with this
before using embeded perl
(http://nagios.sourceforge.net/docs/2_0/embeddedperl.html)

By the way, "UNKNOWN" has a retrun value of 3, not -1.

Patrick


-----Message d'origine-----
De : nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] De la part de Janet Post
Envoyé : lundi 6 novembre 2006 20:49
À : Sloane, Robert Raymond; Nagios Users Mailing List
Objet : Re: [Nagios-users] Script returns "No Output"

Thanks Robert!  That worked like a charm.  

Except, now I am curious as to why some scripts need to have perl executed
directly and not others.  Any ideas?


-----Original Message-----
From: Sloane, Robert Raymond [mailto:sloane at ku.edu]
Sent: November 6, 2006 2:33 PM
To: Janet Post
Subject: RE: [Nagios-users] Script returns "No Output"

Try changing the Nagios command object to execute perl directly rather than
just calling the script:

define command {
command_name    check_apache_threads
command_line    /usr/bin/perl $USER1$/check_apache.pl
}

and see if that fixes the problem.
--
Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
Email:sloane at ku.edu http://www.ku.edu/home/sloane Phone:(785)864-0444
 

> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net 
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf 
> Of Janet Post
> Sent: Monday, November 06, 2006 1:30 PM
> To: Nagios Users Mailing List
> Subject: [Nagios-users] Script returns "No Output"
> 
> 
> Hello All.
> 
> I have written several custom nagios scripts, and most work 
> just fine. But recently, I have written a script to check the 
> number of apache idle threads on an apache server.
> 
> The script works just fine on the command line, but nagios 
> returns "No Output".  I'm getting very annoyed with this 
> script as I can not for the life of me determine the problem. 
>  If someone (ANYONE) would be able to help me solve this 
> problem, I would be most grateful.
> 
> I have included the script as an attachment.  For those with 
> a discerning eye, you will recognize this script as a 
> bastardization of the original check_apache script only 
> updated to parse a server status page that is formatted 
> differently and minus the stuff I did not need.
> 
> 
> Thanks,
> 
> Janet Post
> 
> 
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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