[Nagiosplug-help] Web interface shows UNKNOWN although Perl pluginsreturn exit code 0

Christoph Haas email at christoph-haas.de
Fri Apr 13 20:24:27 CEST 2007


Peter,

On Fri, Apr 13, 2007 at 06:40:25PM +0200, Fetzer, Peter wrote:
> Christoph Haas wrote:
> > I am currently migrating from Nagios 1.x to 2.6 and want to take my
> > collection of self-made Perl plugins with me. (I was pointed at
> > nagiosexchange on IRC but the plugins I was interested in were either
> > Windows-only or written in PHP or didn't compile or were 
> > evily insecure
> > so I decided to stay with what I did already so I can blame myself.)
> > 
> > The plugins generally work well. They print out the status 
> > line as they
> > used to and return the exit code 0 (tested with "echo $?" on 
> > the bash).
> > However the web interface of Nagios shows them as "UNKNOWN" in yellow.
> 
> do you have embedded perl turned on in your nagios installation?
> If you do so or if you don't know, because you installed from a binary
> package, try to change your command definition from
> 
> command_line    /path/to/script.pl ...
> to
> command_line    /usr/bin/perl -w /path/to/script.pl ...

Perfectly - it works! I didn't know a shebang-introduced script is
handled differently than calling perl explicitly with the script's name.
But I don't claim to understand all the gears of the embedded Perl
interpreter yet.

Thank you and have a nice weekend.

 Christoph





More information about the Help mailing list