Nagios ignoring Perl Shebang

Arno Lehmann al at its-lehmann.de
Fri Jan 27 09:58:02 CET 2006


Hello,

On 1/27/2006 5:24 AM, Stanley.Hopcroft at Dest.gov.au wrote:
> 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.

Yes, but I *think* I recall something about special requirements for 
Perl plugins that are interpreted by he embedded Perl engine. The manual 
section docs/embeddedperl.html lists some restrictions and things to 
consider. Anyway, since I never used ePN,I have no hands-on experience 
if any "normal" Perl program needs chenges.

> 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 wish that were more common knowledge)

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

Indeed, and those are valuable hints.

Arno

> 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=k&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
> 

-- 
IT-Service Lehmann                    al at its-lehmann.de
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------
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&kid=103432&bid=230486&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