[checkmk-commits] Check_MK Git: check_mk: raritan_pdu_inlet: First unit correction

Bastian Kuhn bk at mathias-kettner.de
Fri Aug 1 14:54:06 CEST 2014


Module: check_mk
Branch: master
Commit: 292c988487b776f70b0984abc51a3662d58a14e4
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=292c988487b776f70b0984abc51a3662d58a14e4

Author: Bastian Kuhn <bk at mathias-kettner.de>
Date:   Fri Aug  1 14:54:01 2014 +0200

raritan_pdu_inlet: First unit correction

---

 checks/raritan_pdu_inlet |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/checks/raritan_pdu_inlet b/checks/raritan_pdu_inlet
index a543408..a81c3c8 100644
--- a/checks/raritan_pdu_inlet
+++ b/checks/raritan_pdu_inlet
@@ -28,11 +28,12 @@ def raritan_pdu_inlet_convert(info):
     # List of tuples, sorting like the snmp output,
     # each tuple contains: capabilities, Unit, digits
     translation = (
-      ( '1',    '1',    0 ),
-      ( '2',    '2',    1 ),
-      ( '-1',   '0',     2 ),
-      ( '0',  '0',     0 ),
-      ( '5',    '5',    0),
+      ( '1',  0 ),
+      ( '2',  0 ),
+      ( '3',  0 ),
+      ( '4',  0 ),
+      ( '-1', 2 ),
+      ( '5',  0 ),
     )
     phases = [ 'L1', 'L2', 'L3' ]
     i = 0
@@ -41,7 +42,7 @@ def raritan_pdu_inlet_convert(info):
         state = line[1]
         for value in line[2:]:
             item = phases[i] + '-' + capabilities[translation[y][0]]
-            unit = translation[y][1]
+            unit = translation[y][0]
             digits = translation[y][2]
             yield item, unit, digits, '1', state, value
             y += 1



More information about the checkmk-commits mailing list