[collectd] Hit counter in threshold

Andrés J. Díaz ajdiaz at connectical.com
Wed Jul 15 17:35:39 CEST 2009


Hi Florian

> 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 :)

> Doesn't this do the trick?:
>
>  <Rule>
>...
>  </Rule>

Sorry, AND must be OR (a logical error :D). Take a real world example,
I have two machines which are in cluster with heartbeat and a harddisk
on a SAN using FC, so the active node of the cluster has the disk
/dev/sda, but not the passive node, but I only dispatch the
notification if both nodes are down, that is if disk_ops for sda is
NaN for both nodes. I think that it was the problem (to be honest I do
not remember exactly).

> This is very powerful, but maybe a bit troublesome to use. Maybe
> providing a simpler interface, such as the MARK target and mark match of
> iptables, will do the trick just as well.

Yep, It's a very good idea, for the above cluster example, we can
increase a "cluster" counter in metadata and the dispatch notification
if counter is odd. IMHO in general the rule syntax is a bit
troublesome if you have a large number of checks, but we can create an
script like iptables... , a collectable :P  which write the rules in
properly format.

> Interesting idea. What do you intend to do in those filters?

Basically stop a notification propagation on some match criteria, or a
dispatch (inmediatly) or a enqueue (the normal behaviour). Obviously
this has no sense if implementing thresholds with filters.

Regards,
  Andres



More information about the collectd mailing list