Module: check_mk
Branch: master
Commit: e8f368db3e5347382bbec94358865694d6e3d96a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8f368db3e5347…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 10 11:06:31 2010 +0100
Changed check/function names of imm_health to have a valid name
---
ChangeLog | 3 +++
checks/imm_health | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bcb06bf..b83d75d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,9 @@
* Configuration check (-X) is now always done. It is now impossible to
call any Check_MK action with an invalid configuration. This saves
you agains mistyped variables.
+ * Renamed check functions of imm_health check from test_imm to imm_health
+ to have valid function and check names. Please remove remove from
+ inventory and re-inventory those checks.
Core, Setup, etc.:
* Improve error handling: if hosts are monitored with SNMP *and* TCP,
diff --git a/checks/imm_health b/checks/imm_health
index 41fbc3b..40a7ffa 100644
--- a/checks/imm_health
+++ b/checks/imm_health
@@ -26,11 +26,11 @@
# Author: Michael Nieporte <micha.nieporte(a)gmail.com> - Based on rsa_health by
Mathias Kettner
-def inventory_test_imm(checkname, info):
+def inventory_imm_health(checkname, info):
if len(info) > 0:
return [(None, None)]
-def check_test_imm(_no_item, _no_params, info):
+def check_imm_health(_no_item, _no_params, info):
num_alerts = (len(info) - 1) / 3
infotext = ""
for i in range(0, num_alerts):
@@ -52,7 +52,7 @@ def check_test_imm(_no_item, _no_params, info):
else:
return (3, "UNKNOWN - " + infotext)
-check_info['test_imm'] = ( check_test_imm, "System health", 0,
inventory_test_imm)
-snmp_info['test_imm'] = ( ".1.3.6.1.4.1.2.3.51.3.1", ["4"] )
-snmp_scan_functions['test_imm'] = \
+check_info['imm_health'] = ( check_imm_health, "System health", 0,
inventory_imm_health)
+snmp_info['imm_health'] = ( ".1.3.6.1.4.1.2.3.51.3.1", ["4"]
)
+snmp_scan_functions['imm_health'] = \
lambda oid: "IMM" in oid(".1.3.6.1.2.1.1.1.0")