Module: check_mk
Branch: master
Commit: 1a070043e2ce66ba31176af8054c923222229e71
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a070043e2ce66…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Aug 1 15:38:28 2014 +0200
#0194 FIX raritan_pdu_inlet: Check now outputs the correct values
The complete checks has been rewritten cause of a few problems with the old version.
A re-inventory of all raritan pdu devices is needed after update.
---
.werks/194 | 11 +++++++++++
ChangeLog | 2 ++
checks/raritan_pdu_inlet | 6 +++---
checks/raritan_pdu_inlet.include | 4 +++-
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/.werks/194 b/.werks/194
new file mode 100644
index 0000000..07eb1a2
--- /dev/null
+++ b/.werks/194
@@ -0,0 +1,11 @@
+Title: raritan_pdu_inlet: Check now outputs the correct values
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.5i6
+Date: 1406900223
+Class: fix
+
+The complete checks has been rewritten cause of a few problems with the old version.
+A re-inventory of all raritan pdu devices is needed after update.
+
diff --git a/ChangeLog b/ChangeLog
index 7aca901..31c01d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
* 0187 FIX: hp_proliant_power: Fixed Wato configuration
* 0192 FIX: oracle_rman_backups: Not longer try to make a inventory for broken plugin
outputs
+ * 0194 FIX: raritan_pdu_inlet: Check now outputs the correct values...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/raritan_pdu_inlet b/checks/raritan_pdu_inlet
index a81c3c8..000d861 100644
--- a/checks/raritan_pdu_inlet
+++ b/checks/raritan_pdu_inlet
@@ -28,8 +28,8 @@ def raritan_pdu_inlet_convert(info):
# List of tuples, sorting like the snmp output,
# each tuple contains: capabilities, Unit, digits
translation = (
+ ( '2', 1 ),
( '1', 0 ),
- ( '2', 0 ),
( '3', 0 ),
( '4', 0 ),
( '-1', 2 ),
@@ -40,10 +40,10 @@ def raritan_pdu_inlet_convert(info):
for line in info:
y = 0
state = line[1]
- for value in line[2:]:
+ for value in line[1:]:
item = phases[i] + '-' + capabilities[translation[y][0]]
unit = translation[y][0]
- digits = translation[y][2]
+ digits = translation[y][1]
yield item, unit, digits, '1', state, value
y += 1
i += 1
diff --git a/checks/raritan_pdu_inlet.include b/checks/raritan_pdu_inlet.include
index b7bc570..8fab020 100644
--- a/checks/raritan_pdu_inlet.include
+++ b/checks/raritan_pdu_inlet.include
@@ -79,7 +79,9 @@ sensor_states = {
def inventory_raritan_pdu_inlet_generic(info):
for line in info:
- yield line[0], None
+ # Ignore closed sensor state
+ if line[4] != '1':
+ yield line[0], None
def check_raritan_pdu_inlet_generic(item, _no_params, info):
for line in info: