Module: check_mk
Branch: master
Commit: 2df9e4ed4b221d1743d05a2cc048d33231438133
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2df9e4ed4b221d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 5 17:10:43 2013 +0100
FIX cisco_fru_power: Trying not to inventorize not plugged in FRUs
In the previous version, the check did inventorize all FRUs reported
by the device. The devices also send information for slots which have
no FRU plugged in. This change tries to ignore all not plugged in slots.
---
.werks/300 | 10 ++++++++++
ChangeLog | 1 +
checks/cisco_fru_power | 4 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/300 b/.werks/300
new file mode 100644
index 0000000..fb2c8ec
--- /dev/null
+++ b/.werks/300
@@ -0,0 +1,10 @@
+Title: cisco_fru_power: Trying not to inventorize not plugged in FRUs
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386259723
+Class: fix
+
+In the previous version, the check did inventorize all FRUs reported
+by the device. The devices also send information for slots which have
+no FRU plugged in. This change tries to ignore all not plugged in slots.
diff --git a/ChangeLog b/ChangeLog
index 36bb941..26ebb28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.3i8:
Checks & Agents:
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
+ * 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
1.2.3i7:
diff --git a/checks/cisco_fru_power b/checks/cisco_fru_power
index b2e50b6..2f57a24 100644
--- a/checks/cisco_fru_power
+++ b/checks/cisco_fru_power
@@ -31,6 +31,8 @@
# .1.3.6.1.4.1.9.9.13.1.5.1.4.1 1
# .1.3.6.1.4.1.9.9.13.1.5.1.4.2 2
+# FRU = Field Replacable Unit
+
# OID 1.3.6.1.4.1.9.9.117.1.1.2.1.2
# Type PowerOperType
# 1:offEnvOther
@@ -63,7 +65,7 @@ power_oper_type = ('', 'offEnvOther', 'on',
'offAdmin', 'offDenied',
power_admin_type = ( '', 'on', 'off', 'inlineAuto',
'inlineOn', 'powercycle')
def inventory_cisco_fru_power(info):
- return [ (line[0], None ) for line in info ]
+ return [ (line[0], None ) for line in info if saveint(line[2]) != 1 ]
def check_cisco_fru_power(item, params, info):
for line in info: