[Nagiosplug-devel] Opinion on multifunction plugins

Thomas Guyot-Sionnest Thomas at zango.com
Fri Jun 29 17:20:03 CEST 2007


> -----Original Message-----
> From: nagiosplug-devel-bounces at lists.sourceforge.net [mailto:nagiosplug-
> devel-bounces at lists.sourceforge.net] On Behalf Of John Vincent
> Sent: June 28, 2007 17:44
> To: nagiosplug-devel at lists.sourceforge.net
> Subject: [Nagiosplug-devel] Opinion on multifunction plugins
> 
> Does anyone have an opinion on multifunctional plugins?
> 
> e.g. I have a mysql plugin that I've written that gets different
> information based on the options passed. -Q gets query_cache hit
> ratio, -q gets queries per sec, -p gets innodb page cache usage and so
> on.
> 
> It's a idea I picked up from the various plugins that Patrick Proy
> writes. His snmp load and mem scripts take different options for
> different plugins. Yeah they're hard to read sometimes but it gets the
> job done and it I happen to like it.

check_tcp is a good example of multifunction plugin. The command-line allows
checking many things trough send and expecting strings, with or without ssl,
and it also has "presets" that are loaded when called as a different name
(usually trough a symlink).

I'm not against it as long as it stays within the plugin's scope. It
wouldn't make sense for example to hack check_tcp to do complex handshake
for protocol X; that belongs to a different plugin. But once you've written
a plugin that talks protocol X then it could possibly make sense to make it
able to check different things trough it.

> Opinions? The reason I asked is that looking at Nagios::Plugin, it
> appears to be designed with a single check in mind. I don't have any
> real data to back that up but that was a first glance thought.

N::P is just a set of tools to make Perl-based Nagios plugin development
brainless. It will eventually supersede the utils.pm currently used in
Nagios-plugins. You can do whatever you want with it (i.e. avoid it for some
tasks and do the work yourself if it doesn't suit your needs) and so far I
haven't noticed any such limitation.

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/20070629/421fc312/attachment.bin>


More information about the Devel mailing list