[Nagiosplug-devel] Patch for persistent data on plugins

Jose Luis Martinez jlmartinez-lists-nagplug-devel at capside.com
Thu Sep 17 14:53:53 CEST 2009


John Vincent escribió:
> On Thu, Sep 17, 2009 at 4:47 AM, Jose Luis Martinez
> <jlmartinez-lists-nagplug-devel at capside.com> wrote:
>> Can we restart the discussion about the different techinques to achive
>> this? I'd like to adopt the one that finally gets used by the C plugins
>> in Nagios::Plugin::Differences.
>>

Pluggable storage is in the roadmap for N::P::Differences. But there is 
one issue that would have to be resolved before that:

The thing is that you can be executing the same plugin with the same 
hostname 2 times on the same machine (with different params). One plugin 
would pick up the data of the other plugin.

As an example:
check_disk --disk=sda -w=90 -c=95
check_disk --disk=sdb -w=90 -c=95

That gets reflected as the "instance" parameter in the proposed API. The 
bad thing is that the developer has to be VERY aware of this situation, 
and could lead to very hard to understand and hard to debug results for 
the user of the plugin.

If in the disk example, the developer chooses the --disk param as the 
instance id, and the plugin has a couple of extra params (to select 
blocks in and blocks out, for example), one possible use of the plugin 
would lead to problems:

check_disk --disk=sda --blocksin -w=90 -c=95
check_disk --disk=sda --blocksout -w=50 -c=95

And the developer may have not been aware of this use case.

IMHO, the instance id should not be selected by the developer, as he is 
not capable of previewing all these situations. There should be a way of 
automatically giving it to the plugin.

The base case is: If you have a plugin that generates a piece of data, 
and recollects it later, and you have it defined N times in Nagios (be 
whatever you want it's parameters), you would exepect that every 
"instance" of the check gets back the data it stored. That would be that 
the check is "bound to the service".

Thomas discussed the pros and cons of some methods to bind the plugins 
to their service. But no method has been agreed on.

Jose Luis Martinez
jlmartinez at capside.com




More information about the Devel mailing list