Module: check_mk
Branch: master
Commit: 2748d310053c7af10c6e4e5f081eef10b2177e9d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2748d310053c7a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 23 14:57:36 2015 +0200
Minor code cleanup in WUT checks
---
checks/wut_webtherm | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/checks/wut_webtherm b/checks/wut_webtherm
index 96932f8..62f3b55 100644
--- a/checks/wut_webtherm
+++ b/checks/wut_webtherm
@@ -26,16 +26,7 @@
def detect_webtherm(oid):
- return oid(".1.3.6.1.2.1.1.2.0") in \
- [ ".1.3.6.1.4.1.5040.1.2.1",
- ".1.3.6.1.4.1.5040.1.2.2",
- ".1.3.6.1.4.1.5040.1.2.3",
- ".1.3.6.1.4.1.5040.1.2.6",
- ".1.3.6.1.4.1.5040.1.2.7",
- ".1.3.6.1.4.1.5040.1.2.8",
- ".1.3.6.1.4.1.5040.1.2.9",
- ".1.3.6.1.4.1.5040.1.2.16",
- ".1.3.6.1.4.1.5040.1.2.18" ]
+ return
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5040.1.2.")
def parse_wut_webtherm(info):
@@ -52,14 +43,14 @@ def parse_wut_webtherm(info):
# declare more sensor types here.
if "---" not in reading:
# We have only temperature sensors
- if webtherm_type == "6":
+ if int(webtherm_type) <= 9: # TODO: this is just a guess
parsed[sensor_id] = {
"type" : "temp",
"reading" : float(reading),
}
# Here we have three different types of sensors:
# 1 = temp, 2 = humid, 3 = air pressure
- elif webtherm_type == "16":
+ else:
parsed[sensor_id] = {
"type" : map_sensor_type[sensor_id],
"reading" : float(reading),