Module: check_mk
Branch: master
Commit: 833cf55c0835aac3350440c430218b0ed0fb244c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=833cf55c0835aa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 23 15:08:08 2015 +0100
Added internal comment for future get_rate
---
modules/check_mk_base.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 1051e85..f97061e 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -938,6 +938,11 @@ def clear_counters(pattern, older_than):
del g_counters[name]
+# Idea (1): We could keep global variables for the name of the checktype and item
+# during a check and that way "countername" would need to be unique only
+# within one checked item. So e.g. you could use "bcast" as name and not
"if.%s.bcast" % item
+# Idea (2): Check_MK should fetch a time stamp for each info. This should also be
+# available as a global variable, so that this_time would be an optional argument.
def get_rate(countername, this_time, this_val, allow_negative=False, onwrap=SKIP):
try:
timedif, rate = get_counter(countername, this_time, this_val, allow_negative)