[Nagiosplug-devel] Preferred method for perl plugin
Guillaume Rousse
Guillaume.Rousse at inria.fr
Sun Nov 15 19:59:51 CET 2009
shadih rahman a écrit :
> What is the preferred method of using Nagios exit code? Should I use
> the utils.pm <http://utils.pm> that is distributed with Nagios plugin
> package? or should I use the cpan Nagios::Plugins ? Please advise on
> this. Thanks
There no actual 'prefered' method, it's up to you.
Using 'utils.pm' requires you to know the physical location of this
file, which may change between hosts. And it doesn't bring much more
than constants for the 4 exist status.
Using Nagios::Plugin change the first constraint to ensure it is
installed on your target host, but you don't need to know where it is
exactly. And it brings much more than 4 constants...
All in all, if your only need is to use named constants instead of
numeric values, you can also just hardcode them in your plugin, they
don't change too often...
--
BOFH excuse #119:
evil hackers from Serbia.
More information about the Devel
mailing list