[Nagiosplug-devel] Nagios:Plugin feedback

Thomas Guyot-Sionnest Thomas at zango.com
Thu Jan 18 23:13:53 CET 2007


I just switched two of my checks (BigIP checks I put on NagiosExchange under
the name 'dermoth') to Nagios::Plugin. Since it's still brand new I though
you would like to hear some feedback :)

First of all it's awesome! Most of my functions and multi-line conditional
statements were replaced by one-liners. Makes the code much simpler thus
leaving more room for debug code and enhancements. The interface is simple
yet powerful.

So far I came across only two glitches:

1. Installing Nagios::Plugins with CPAN on Slackware 11.0, there's one
dependency that isn't installed, Test::Exception.
2. Default shortname, 'uc basename $0', return "P1" with ePN. I'm not sure
if there's a way around this, but maybe using 'uc $np->plugin' (actually it
won't be that, but you get the idea) so at least if plugin is set (it was in
my case) there won't be need to explicitly define shortname.

Questions:

Is there a is_hostname function? is_ipaddr would be useful as well.
What about passing argument check code directly in the add_arg() arguments?

Would look like this (Not 100% sure about the syntax, I'm not a Perl guru ):
$p->add_arg(
  spec => 'name|n=s',
  help => qq{-n, --name=<name>)
  check => &namecheck
  failure => "Name argument must me a name"
);

I will release these new checks as soon as I'm done with some more stuff
(supporting v9 models, adding thresholds arguments...)

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070118/4cd25b05/attachment.bin>


More information about the Devel mailing list