[Nagiosplug-devel] Please can I have GIT access

Ton Voon ton.voon at opsera.com
Fri Sep 4 14:47:49 CEST 2009


Sorry, didn't read this thread earlier.

I also prefer the files option. My approach is to abstract the  
plugin's interface to the actual implementation, and then get the  
implementation working in the simplest way possible first. If it turns  
out to be a bottleneck, we can enhance the implementation without  
changes to the plugin.

So I think we should have a nagios plugins library called  
np_write_state_data() and np_read_state_data().

What's the interface? Please help flesh this out. I'm guessing on a  
write you would pass:
   * plugin name
   * optional index name for the state data (eg, hostname)
   * time of invocation
   * serialized data

On a read, you pass:
   * plugin name
   * optional index name

You get returned (null for error):
   * last time
   * serialized data

We can implement this first as writing to files. If this is a problem,  
we can always switch to memcache or sqllite or some other technique  
later.

If we can agree a design, I'll be looking for someone to volunteer to  
write this with appropriate tests to go into core plugins code. Then  
we can switch any particular plugins to use this if state info is  
required.

Ton





More information about the Devel mailing list