Module: check_mk
Branch: master
Commit: 1d5e836023e3131a8ed9fdda08db7fc849885991
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d5e836023e313…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 14 12:07:19 2013 +0200
FIX: f5_bigip_psu: handle more than first power supply
Conflicts:
checks/f5_bigip_psu
---
ChangeLog | 1 +
checks/f5_bigip_psu | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c47cf60..15a2ce5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -128,6 +128,7 @@
* FIX: jolokia_info: ignore ERROR instances
* FIX: apache_status: use (also) apache_status.cfg instead of apache_status.conf
* FIX: f5_bigip_vserver: fix wrong OID (13 instead of 1), thanks to Miro Ramza
+ * FIX: f5_bigip_psu: handle more than first power supply, thanks to Miro Ramza
1.2.2p1:
diff --git a/checks/f5_bigip_psu b/checks/f5_bigip_psu
index caa4fca..99a0066 100644
--- a/checks/f5_bigip_psu
+++ b/checks/f5_bigip_psu
@@ -40,7 +40,8 @@
def inventory_f5_bigip_psu(info):
inventory = []
for line in info:
- psu, state = line[0]
+ psu = line[0]
+ state = line[1]
# inventorize the PSU unless it's in state 2 (notpresent)
if state != "2":
inventory.append((psu, None))
@@ -48,8 +49,8 @@ def inventory_f5_bigip_psu(info):
def check_f5_bigip_psu(item, _no_params, info):
for line in info:
- psu = line[0][0]
- state = int(line[0][1])
+ psu = line[0]
+ state = int(line[1])
if psu == item:
if state == 1:
return (0, "PSU state: good")
@@ -68,7 +69,7 @@ check_info["f5_bigip_psu"] = {
'inventory_function': inventory_f5_bigip_psu,
'service_description': 'PSU %s',
# Get ID and status from the SysChassisPowerSupplyTable
- 'snmp_info': [('.1.3.6.1.4.1.3375.2.1.3.2.2.2.1', [1,
2])],
+ 'snmp_info': ('.1.3.6.1.4.1.3375.2.1.3.2.2.2.1', [1,
2]),
'snmp_scan_function': \
# Check using the vendor mib Id and verify it's a loadbalancer
lambda oid: '.1.3.6.1.4.1.3375.2' in oid(".1.3.6.1.2.1.1.2.0") \