Module: check_mk
Branch: master
Commit: 81616ce25f8cba91083ebcfd655676253f1ccc2b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81616ce25f8cba…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Jul 4 09:56:51 2016 +0200
3693 FIX ups_eaton_enviroment: Fixed handling of dictionary-based parameters
Rediscovery of the affected hosts is required
---
.werks/3693 | 10 ++++++++++
ChangeLog | 2 ++
checks/ups_eaton_enviroment | 24 ++++++++++++++----------
3 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/.werks/3693 b/.werks/3693
new file mode 100644
index 0000000..1aa0cc9
--- /dev/null
+++ b/.werks/3693
@@ -0,0 +1,10 @@
+Title: ups_eaton_enviroment: Fixed handling of dictionary-based parameters
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+State: unknown
+Version: 1.4.0i1
+Date: 1467618964
+
+Rediscovery of the affected hosts is required
diff --git a/ChangeLog b/ChangeLog
index 7f59a79..0925668 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -293,6 +293,8 @@
* 3686 FIX: hp_proliant_temp: fixed wrong device thresholds handling. If no
thresholds available the device reports -99
* 3150 FIX: fixed helpers failing to start and high cpu load when an unparsable local
check is installed...
* 3151 FIX: windows agent: further fix to crashes on failures to query wmi
+ * 3693 FIX: ups_eaton_enviroment: Fixed handling of dictionary-based parameters...
+ NOTE: Please refer to the migration notes!
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/ups_eaton_enviroment b/checks/ups_eaton_enviroment
index 61e3fc8..c090e6c 100644
--- a/checks/ups_eaton_enviroment
+++ b/checks/ups_eaton_enviroment
@@ -25,14 +25,17 @@
# Boston, MA 02110-1301 USA.
-ups_eaton_enviroment_default = {
+factory_settings["ups_eaton_enviroment_default"] = {
"temp" : (40, 50),
"remote_temp" : (40, 50),
"humidity" : (65, 80),
}
+
+
def inventory_ups_eaton_enviroment(info):
if len(info) > 0:
- return [ (None, "ups_eaton_enviroment_default") ]
+ return [ (None, {}) ]
+
def check_ups_eaton_enviroment(item, params, info):
wert = map(saveint, info[0])
@@ -55,13 +58,14 @@ def check_ups_eaton_enviroment(item, params, info):
messages.append(text)
return (state, ", ".join(messages), perfdata)
-check_info['ups_eaton_enviroment'] = {
- "inventory_function" : inventory_ups_eaton_enviroment,
- "check_function" : check_ups_eaton_enviroment,
- "service_description" : "Enviroment",
- "has_perfdata" : True,
- "group" : "eaton_enviroment",
- "snmp_info" : ( ".1.3.6.1.4.1.534.1.6", [1,5,6 ] ),
- "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in
[".1.3.6.1.4.1.705.1.2", ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1"]
+check_info['ups_eaton_enviroment'] = {
+ "default_levels_variable" : "ups_eaton_enviroment_default",
+ "inventory_function" : inventory_ups_eaton_enviroment,
+ "check_function" : check_ups_eaton_enviroment,
+ "service_description" : "Enviroment",
+ "has_perfdata" : True,
+ "group" : "eaton_enviroment",
+ "snmp_info" : ( ".1.3.6.1.4.1.534.1.6", [1,5,6 ] ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
in [".1.3.6.1.4.1.705.1.2", ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1"],
}