author | Andrés J. Díaz <ajdiaz@connectical.com> | |
Mon, 31 Aug 2009 19:16:41 +0000 (21:16 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 31 Aug 2009 19:39:35 +0000 (21:39 +0200) | ||
commit | 43dbb24a3f311271da590ddf0c76f4d50681e388 | |
tree | 43d84dbdcf956e90d5bca6f2a78c11ffefb2c327 | tree | snapshot |
parent | 9bf72b2afd1e7151cf02def4a5512ebc8626a0cf | commit | diff |
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@leeloo.lan.home.verplant.org>
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@leeloo.lan.home.verplant.org>
src/utils_threshold.c | diff | blob | history |