Module: check_mk
Branch: master
Commit: fb112d6af1b39086526213acc8f89b23b1c9cae3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb112d6af1b390…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Aug 6 14:03:18 2014 +0200
raritan_pdu_inlet: Fixed wrong sensor state
---
checks/raritan_pdu_inlet | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/checks/raritan_pdu_inlet b/checks/raritan_pdu_inlet
index 000d861..736329c 100644
--- a/checks/raritan_pdu_inlet
+++ b/checks/raritan_pdu_inlet
@@ -26,7 +26,7 @@
def raritan_pdu_inlet_convert(info):
# List of tuples, sorting like the snmp output,
- # each tuple contains: capabilities, Unit, digits
+ # each tuple contains: capabilities, digits
translation = (
( '2', 1 ),
( '1', 0 ),
@@ -37,9 +37,11 @@ def raritan_pdu_inlet_convert(info):
)
phases = [ 'L1', 'L2', 'L3' ]
i = 0
+ state = 4 # We dont know the senosr state, so we assume normal
for line in info:
y = 0
- state = line[1]
+ # loop over the current Sensor values.
+ # We know the units cause of the translation list
for value in line[1:]:
item = phases[i] + '-' + capabilities[translation[y][0]]
unit = translation[y][0]