author | Andrés J. Díaz <ajdiaz@connectical.com> | |
Mon, 31 Aug 2009 16:06:15 +0000 (18:06 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 31 Aug 2009 19:38:43 +0000 (21:38 +0200) | ||
commit | 9bf72b2afd1e7151cf02def4a5512ebc8626a0cf | |
tree | e3780cb9cfd6a4140102e18d0766d40f16df4771 | tree | snapshot |
parent | 04aafd7055a91fc432555ab3dec3574a888a6c8c | commit | diff |
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@leeloo.lan.home.verplant.org>
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@leeloo.lan.home.verplant.org>
src/utils_cache.c | diff | blob | history | |
src/utils_cache.h | diff | blob | history |