[Nagiosplug-devel] Please can I have GIT access

Max perldork at webwizarddesign.com
Fri Sep 4 15:15:05 CEST 2009


On Fri, Sep 4, 2009 at 8:47 AM, Ton Voon<ton.voon at opsera.com> wrote:
> So I think we should have a nagios plugins library called
> np_write_state_data() and np_read_state_data().

that sounds good.

> 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

Should we pass in time or should the write_state do that for the user
so plugin developers do not have to repeat passing in time every time
this is called?

> On a read, you pass:
>   * plugin name
>   * optional index name
>
> You get returned (null for error):
>   * last time
>   * serialized data

Would you return the last time or the number of seconds since the last
write call?  Do I as a developer care about the real time or do I care
about the interval between calls to write and read?  My personal
preference and experience with plugins is that it is the interval
between calls that matters, not the absolute timestamps.

> 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.

Would be nice to have the framework set up a well-defined interface so
that multiple backends can be used ... I could see a file based
default backend, but should be an easy way to add new backends for
other persistent storage options.

> 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.

Nice.  This sounds like a very reasonable and useful approach and very
cool to see it going into the core plugin framework.

- Max




More information about the Devel mailing list