[Nagiosplug-devel] Please can I have GIT access

Holger Weiß holger at CIS.FU-Berlin.DE
Mon Aug 31 01:18:54 CEST 2009


* Thomas Guyot-Sionnest <dermoth at aei.ca> [2009-08-30 16:36]:
> On 29/08/09 11:04 AM, Alain Williams wrote:
> > I cannot see how else to do it - the information needs to be stored somewhere.
> > No one suggested anything else.
> 
> You can use the performance data as I'm implementing in check_snmp... I
> wrote functions to get data out of it.

To be honest, I don't really like abusing the performance data string
(or any other solution which involves Nagios) all that much, either.
For example, this won't work without additional hacks if the plugin is
executed as a passive check, or if it's used with a monitoring software
other than Nagios (unless that software makes the performance string of
the previous check available, too).

Personally, I'd actually be fine with holding state in files, I'd just
prefer abstracting that away via some np_{read,write}_state() functions
just in case other plugins need such functionality in the future, too.
This would make sure that all such plugins in our repository use the
same mechanism (which makes things clear for the user; e.g., deleting a
single file or directory would clear all state), and the storage backend
could be changed (or even be made configurable) in the future without
touching the plugins.

Just my 2 ¢, Holger




More information about the Devel mailing list