Module: check_mk
Branch: master
Commit: 58d283b1fc236fa6f43cf96178c4cd8920f59610
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=58d283b1fc236f…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Wed Jan 15 10:27:57 2014 +0100
minor changes to io behaviour
---
checks/cmciii | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/checks/cmciii b/checks/cmciii
index 18f163b..40e33c1 100644
--- a/checks/cmciii
+++ b/checks/cmciii
@@ -70,7 +70,7 @@
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.14 10 s
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.15 Closed
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.16 0
-# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.17 Override function
+# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.17 Input_1
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.18 1
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.19 0:Off / 1:On
# .1.3.6.1.4.1.2606.7.4.2.2.1.10.1.20 0.5 s
@@ -104,7 +104,7 @@
# .1.3.6.1.4.1.2606.7.4.1.2.1.3.9 Right Door
# .1.3.6.1.4.1.2606.7.4.1.2.1.3.10 Side Exit
# .1.3.6.1.4.1.2606.7.4.1.2.1.3.11 Emergency Exit
-#
+#
# Example for info:
# [['1.1', 'Temperature.DescName', 'Temperature'],
@@ -145,7 +145,7 @@
# 'Value': '0'},
# ('1', 'Input 1'): {'Category': '0',
# 'Delay': '0.5 s',
-# 'DescName': 'Override function',
+# 'DescName': 'Input_1',
# 'Logic': '0:Off / 1:On',
# 'Status': 'On',
# 'Value': '1'},
@@ -347,22 +347,28 @@ def check_cmciii_io(item, params, info):
grouping = entry.get('Grouping')
if relay: # output relay
- if status == "Off":
+ if status == "OK":
state = 0
sym = ""
else:
- state = 1
- sym = "(!)"
+ state = 2
+ sym = "(!!)"
infotext = "%s: %s%s, Relay %s, Grouping %s, Logic %s" % \
( descr, status, sym, relay, grouping, logic)
else: # input relay
- if value == "0":
+ if status == "OK":
state = 0
sym = ""
- else:
+ elif status == "Off":
+ state = 0
+ sym = ""
+ elif status == "On":
state = 1
sym = "(!)"
- infotext = "%s: %s, Value %s%s, Logic %s, Delay %s" % \
+ else:
+ state = 2
+ sym = "(!!)"
+ infotext = "%s: %s, Status %s%s, Logic %s, Delay %s" % \
( descr, status, value, sym, logic, delay)
return (state, infotext)
@@ -640,4 +646,3 @@ check_info['cmciii.state'] = {
"snmp_scan_function" : cmciii_scan,
"snmp_info" : cmciii_snmp_info,
}
-#.