[collectd] Hit counter in threshold

Andrés J. Díaz ajdiaz at connectical.com
Tue Jul 7 14:08:38 CEST 2009

Mmm I think that your are thinking in a flapping detector. The hits
are designed to measure some indicators which change their values
frequently, for example CPU jiffies, and i only need to dispatch the
threshold if the value is 100% for a 5 minutes  (for example).

I also planned to create a new patch which calculate the average
values in the cache, and so create a flap detection (percent of state
changes) and match "heuristic" threshold, that is "for 7 hits threre
are an 80% of values match with threshold", i think that it's your
idea too :)


2009/7/3 Mariusz Gronczewski <xani666 at gmail.com>:
> Yeah but then u can get sequence like "over, over, under, over, over,
> under" and it will never trigger, but in most cases it will work
> okay,and in that 2% you can just make threshold bit lower and still it
> will be working good enough :)
> 2009/7/3 Andrés J. Díaz <ajdiaz at connectical.com>:
>> Hi Mariusz et al
>> Currenty the hit counter is reset when threshold value is reset, that
>> is, when value do not match. If each interval has a new value, then if
>> almost 3 (in the example)  match with threshold, then the notification
>> is raised, but if teh value do not match, the counter is reset always.
>> So there are no need to expire the counter, because the counter
>> expires in each interval (if the value do not match with the
>> threshold).
>> Regards,
>>  Andres
>> 2009/7/3 Mariusz Gronczewski <xani666 at gmail.com>:
>>> Hi.
>>> i must say its kinda awesome idea, tho one thing would be nice, to
>>> have some kind of "expire" timer (reset counter after x "good" values
>>> or after x min) so it wont be triggered for example when there is 1
>>> spike, then 12h normal, then another spike etc.
>>> Regards
>>> Mariusz
>>> 2009/7/3 Andrés J. Díaz <ajdiaz at connectical.com>:
>>>> Hi
>>>> I've attached a patch to add hit counter to thresholds, that is, each
>>>> time when threhsold raised, then an internal hit counter is
>>>> incremented, when the value of the counter raise a specific value
>>>> setted in configuration, then the notification is generated and
>>>> counter is reset. Here are an example of threshold configuration with
>>>> hit conter:
>>>> <Threshold>
>>>>  <Plugin load>
>>>>    <Type load>
>>>>       WarninMax 1
>>>>       Hits 3
>>>>    </Type>
>>>>   </Plugin>
>>>> </Threshold>
>>>> In this example the notification will be generated when load value is
>>>> greater than 1 for 3 intervals.
>>>> Here are two patches, the first one adds hit feature to the collectd
>>>> cached and the second one use hits in thresholds,
>>>> Of course comments and suggestions are welcome :)
>>>> Enjoy!
>>>> Regards,
>>>>  Andres
>>>> _______________________________________________
>>>> collectd mailing list
>>>> collectd at verplant.org
>>>> http://mailman.verplant.org/listinfo/collectd

More information about the collectd mailing list