Module: check_mk
Branch: master
Commit: 676ea5ad54854e733d9cfcad701812e2604f6dc8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=676ea5ad54854e…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Mar 3 13:59:37 2015 +0100
#1893 cisco_power: Now discovers all power supplies, not only redundant ones
The check previously ignored non-redundant power supplies. Now, all are inventorized.
---
.werks/1893 | 9 +++++++++
ChangeLog | 1 +
checkman/cisco_power | 2 +-
checks/cisco_power | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/1893 b/.werks/1893
new file mode 100644
index 0000000..fb4677a
--- /dev/null
+++ b/.werks/1893
@@ -0,0 +1,9 @@
+Title: cisco_power: Now discovers all power supplies, not only redundant ones
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1425387426
+Class: feature
+
+The check previously ignored non-redundant power supplies. Now, all are inventorized.
diff --git a/ChangeLog b/ChangeLog
index 47f18ca..7b93eda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -101,6 +101,7 @@
NOTE: Please refer to the migration notes!
* 1952 check_mk_agent.linux: integrated runas plugin into check_mk_agent.linux...
* 2083 Added Siemens PLC (SPS) monitoring...
+ * 1893 cisco_power: Now discovers all power supplies, not only redundant ones...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/cisco_power b/checkman/cisco_power
index 87c59ba..7d0214b 100644
--- a/checkman/cisco_power
+++ b/checkman/cisco_power
@@ -4,7 +4,7 @@ catalog: hw/network/cisco
license: GPL
distribution: check_mk
description:
- This check monitors the health of redundant power supplies in
+ This check monitors the health of power supplies in
Cisco switches. If one of the two power supplies fails, the
check returns {CRIT}.
diff --git a/checks/cisco_power b/checks/cisco_power
index 7dc3e81..b16a74d 100644
--- a/checks/cisco_power
+++ b/checks/cisco_power
@@ -56,7 +56,7 @@ def inventory_cisco_power(info):
# by appending a "/4" for ID 4 if the name is not unique
discovered = {}
for sid, textinfo, state, source in info:
- if 'RPS NotExist' not in textinfo and state != '5':
+ if state != '5':
name = cisco_sensor_item(textinfo, sid)
discovered.setdefault(name, []).append(sid)