Module: check_mk
Branch: master
Commit: 902cf619a38f160c55dbbbb83ff9e1ac18bf6906
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=902cf619a38f16…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 27 13:06:21 2015 +0000
#2546 FIX brocade_mlx_power: Only discover power supplies in state normal/failure, skip
other states
When power supplies are removed from a device, they remain in the SNMP data with state
"other".
Check_MK was still discovering those power supplies but should not.
---
.werks/2546 | 11 +++++++++++
ChangeLog | 1 +
checks/brocade_mlx_power | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2546 b/.werks/2546
new file mode 100644
index 0000000..e2411d4
--- /dev/null
+++ b/.werks/2546
@@ -0,0 +1,11 @@
+Title: brocade_mlx_power: Only discover power supplies in state normal/failure, skip
other states
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1440680714
+
+When power supplies are removed from a device, they remain in the SNMP data with state
"other".
+Check_MK was still discovering those power supplies but should not.
diff --git a/ChangeLog b/ChangeLog
index 496d6a2..55443fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -144,6 +144,7 @@
* 2522 FIX: check_mk_agent.aix: now handles different output formats of the uptime
function
* 1287 FIX: akcp_temperature: Fixed interpretation of device levels...
* 2545 FIX: akcp_daisy_temp: sensorProbe8-X20 not trying to discover services on
these devices
+ * 2546 FIX: brocade_mlx_power: Only discover power supplies in state normal/failure,
skip other states...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/brocade_mlx_power b/checks/brocade_mlx_power
index 50fa03b..6bc62fb 100644
--- a/checks/brocade_mlx_power
+++ b/checks/brocade_mlx_power
@@ -33,7 +33,8 @@ def brocade_mlx_power_combine_item(id, descr):
def inventory_brocade_mlx_power(info):
inventory = []
for power_id, power_descr, power_state in info:
- inventory.append( (brocade_mlx_power_combine_item(power_id, power_descr), None)
)
+ if power_state != "1":
+ inventory.append( (brocade_mlx_power_combine_item(power_id, power_descr),
None) )
return inventory
def check_brocade_mlx_power(item, _no_params, info):