[collectd] Hit counter in threshold

Florian Forster octo at verplant.org
Tue Aug 4 13:13:45 CEST 2009


On Wed, Jul 15, 2009 at 05:35:39PM +0200, Andrés J. Díaz wrote:
> > My idea is to add `meta data' to the global cache, which should
> > solve precisely this problem. A match or target (or any other piece
> > of code) could then do something similar to this:
> This is a very good idea, not only for thresholds, but also to save
> external information into cache. I really like very much :)

I finally got around to implement this. The implementation is basically
a duplication of the interface available from `src/meta_data.h', but
takes a `value_list_t' instead of a `meta_data_t'. The appropriate value
is received from the cache, the meta data object is received and the
appropriate meta data function is called.

I decided against handing out the meta data object because this would
cause some serious synchronization issues and would require confusing
bookkeeping. For example, you cannot remove a cache entry while the meta
data object is used somewhere else.

As a demonstration I have removed the cache from the network plugin and
replaced the functionality with the meta data implementation.

As always, any feedback is welcome :)

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090804/0fb1c8d6/attachment.pgp 

More information about the collectd mailing list