perl plug-in problem
Andrew Lillie
a.lillie at surewest.net
Wed Dec 8 19:24:18 CET 2004
Well, if this is the entirety of your script, the problem is that
$ERRORS{'OK'} has no value, so there's no way for Nagios to know what
state you're attempting to return.
There are a variety of ways to rectify this. One would be to add the
following before your print statement:
use lib "/usr/lib/nagios/plugins";
use utils qw(%ERRORS);
This should let your script return 0, which Nagios should see and an
"OK" state.
-Andrew
Jacob Walcik wrote:
>i'm trying to write a very basic test script in perl that always
>returns a status of "OK". the script is very basic, and i've based
>the output on the code i see in some of the existing perl-based
>plugins. however, whenever i configure nagios to execute it, it
>always fails with the status information "(No output!)".
>
>the script is globally executable, it's in the nagios libexec
>directory, and i've tested it under the nagios user to be sure that
>the output is correct on the command line. the contents of the script
>are pasted in below, can anyone tell me what i've done wrong?
>
>------------------------------------
>#!/usr/bin/perl
>
>print "dummy plugin\n";
>exit $ERRORS{'OK'};
>------------------------------------
>
>that's it. any suggestions?
>
>
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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