[collectd-changes] collectd, the system statistics collection daemon: Changes to 'master'
Florian Forster
octo at verplant.org
Mon Aug 31 21:56:17 CEST 2009
src/utils_cache.c | 78 ++++++++++++++++++++++++++++++++++++++++
src/utils_cache.h | 3 ++
src/utils_threshold.c | 94 +++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 169 insertions(+), 6 deletions(-)
New commits:
commit 43dbb24a3f311271da590ddf0c76f4d50681e388
Author: Andrés J. DÃaz <ajdiaz at connectical.com>
Date: Mon Aug 31 21:16:41 2009 +0200
src/utils_threshold.c: Implement the âHitsâ and âHysteresisâ config options.
Hi all!
Based on Mariusz's idea, i attach a patch for thresholds (no for
filtering, yet) with basic hysteresis support adding the keyword
Hysteresis to configuration file, for example:
<Threshold>
<Type "load">
DataSource "midterm"
WarningMax 1
Hysteresis 0.3
</Type "load">
</Treshold>
In this case the notification is raised when load (midterm datasource)
is greater than 1, and came back to OKAY when lower than 0.7 (1 - 0.3).
This is a proof of concept and I do not have a lot of time to test,
please use this patch with caution. Furthermore, the code is really hard
and dirty :)
Best regards,
Andres
P.S.: The patch also including hits support, so to compile you also
require to apply hits-cache.patch and, obviously this patch is
incompatible with hits-threshold.patch.
Signed-off-by: Florian Forster <octo at leeloo.lan.home.verplant.org>
commit 9bf72b2afd1e7151cf02def4a5512ebc8626a0cf
Author: Andrés J. DÃaz <ajdiaz at connectical.com>
Date: Mon Aug 31 18:06:15 2009 +0200
src/utils_cache.c: Implement âuc_{get,set,inc}_hitsâ.
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
Signed-off-by: Florian Forster <octo at leeloo.lan.home.verplant.org>
More information about the collectd-changes
mailing list