[Nagiosplug-devel] Output from plugin not displayed by Nagios ?

Subhendu Ghosh sghosh at sghosh.org
Thu May 30 23:32:01 CEST 2002


On Fri, 31 May 2002, Jose L. Marcos wrote:

> Hi,
> 
> I'm playing with check_hprsc.pl PERL plugin (from netsaintplug-1.2.9-4
> contribs) and Nagios 1.0b2... 
> 
> check_hprsc makes use of snmpwalk to grab information on filesystems
> from a hpux host  (actually it does also some cpu check, but I'm only
> using filesystem free space check functionality), does some calculation
> then ends by returning an exit code (-1,0,1 or 2) and a text message (1
> line < 80 chars).

Nagios support POSIX codes only  - 0,1,2,3 -   3 == UNKNOWN not -1

> 
> Ok. Everything works fine except for Nagios not showing me the output
> from the plugin.
> 
> This particular plugin just uses a 'printf "Text (%format)\n"' statement
> to display informative messages. The thing that puzzles me, is : if I
> explicitly put a 'print "blabla\n"; exit 1;' before any real code
> execution (let say after 'GetOptions' call) I get the correct status and
> plugin output on Nagios Services View !
>


Does the commandline work? correct path to snmpwalk?
tried running it under perl debugger "perl -d check_hprsc.pl"

-sg





More information about the Devel mailing list