Nagios ignoring Perl Shebang

Stanley.Hopcroft at Dest.gov.au Stanley.Hopcroft at Dest.gov.au
Fri Jan 27 05:24:30 CET 2006


Dear Folks,

>-----Original Message-----
>From: nagios-users-admin at lists.sourceforge.net 
>--__--__--
>
>Message: 1
>Date: Thu, 26 Jan 2006 23:12:03 +0100
>From: Arno Lehmann <al at its-lehmann.de>
>To: nagios-users at lists.sourceforge.net
>Subject: Re: [Nagios-users] Nagios ignoring Perl Shebang - 
>Was: Notification  script problems.. How do I debug
>
>You've probably got a Nagios with embedded Perl running. There's a 
>section in the manual with some hints how to write your Perl 
>scripts in 
>that case.
>
>Arno

I don't think so. 

I haven't been following this thread so I don't have too much helpful to
say but embedded Perl doesn't care about the shebang.

If the plugin text contains the string '/bin/perl' - usually in the
shebang line, 
then the plugin is assumed to be Perl and is compiled by the Perl
compiler (called
by eval { }) once, and thereafter the in core op-codes executed without
recompilation.

In any case, all my plugins and all the standard plugins have a standard
shebang line
that works fine with embedded Perl.

The usual way to deal with _any_ misbehaving program that Nagios runs -
plugins, 
event handlers, the whole shebang - is to wrap the offender in a
reliable script that
captures the argv it was called with, invokes the program with those
args and then
logs args and stdout, stderr to somewhere convenient.

I know that this matter of wrappers has been discussed on this list
before
(my name and Andreas Ericsson).

Yours sincerely.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
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