[Nagiosplug-devel] [ nagiosplug-Bugs-2081810 ] check_rpc return code on false libpath

SourceForge.net noreply at sourceforge.net
Fri Aug 29 18:25:25 CEST 2008


Bugs item #2081810, was opened at 2008-08-29 01:45
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2081810&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: None
>Status: Pending
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Volker (neuntoeter)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_rpc return code on false libpath

Initial Comment:
Hi, 

I noticed a problem with check_rpc.

If check_rpc can't find the utils.pm package in the given libpath (e.g. the utils.pm is not in lib "/usr/local/nagios/libexec";) and check_rpc is executed in nagios, the return code in Nagios is 2 -> Critical and the Plugin Output shown in Nagios only shows (null).

The correct behaviour should be:
Status: Unknown (3)
Output: Can't find utils.pm in lib path.

I spent nearly a whole day finding the reason why check_rpc did not work. 
It took so long to find out, because I didn't get any error when executing it manually in the shell (the utils.pm was in the working directory). 

A perl error message an a status Unknown could have saved me a lot of time.

PS: I used version from 1.4.9

regards, 

Volker

----------------------------------------------------------------------

>Comment By: Thomas Guyot (dermoth)
Date: 2008-08-29 12:25

Message:
Logged In: YES 
user_id=375623
Originator: NO

Did you try running the plugin by hands? It should print a clear error
about missing utils.pm. This is Perl's error code and message, not the
plugin's.

IMO it make absolutely no sense to add an eval in there to catch this
error, especially since it shouldn't happen under normal circumstances and
the error message is clear from the command line. It's also the job of
utils.pm to define Nagios error codes, so handling that would also require
duplicate "fallback" definitions.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2081810&group_id=29880




More information about the Devel mailing list