Module: check_mk
Branch: master
Commit: 4582007483fb8622f61097dc56f053302c91884d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4582007483fb86…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 29 10:43:19 2013 +0200
some minor formating in f5_bigip_psu check
---
checks/f5_bigip_psu | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/checks/f5_bigip_psu b/checks/f5_bigip_psu
index 6972819..caa4fca 100644
--- a/checks/f5_bigip_psu
+++ b/checks/f5_bigip_psu
@@ -37,9 +37,6 @@
# good(1),
# notpresent(2)
-
-
-
def inventory_f5_bigip_psu(info):
inventory = []
for line in info:
@@ -49,7 +46,6 @@ def inventory_f5_bigip_psu(info):
inventory.append((psu, None))
return inventory
-
def check_f5_bigip_psu(item, _no_params, info):
for line in info:
psu = line[0][0]
@@ -67,14 +63,6 @@ def check_f5_bigip_psu(item, _no_params, info):
return (3, "item not found in SNMP output")
-
-# Get ID and status from the SysChassisPowerSupplyTable
-
-
-
-
-# Check using the vendor mib Id and verify it's a loadbalancer
-
check_info["f5_bigip_psu"] = {
'check_function': check_f5_bigip_psu,
'inventory_function': inventory_f5_bigip_psu,
@@ -82,5 +70,7 @@ check_info["f5_bigip_psu"] = {
# 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_scan_function': \
- lambda oid: '.1.3.6.1.4.1.3375.2' in oid(".1.3.6.1.2.1.1.2.0") and
"big-ip" in oid(".1.3.6.1.4.1.3375.2.1.4.1.0").lower(),
+ # 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") \
+ and "big-ip" in
oid(".1.3.6.1.4.1.3375.2.1.4.1.0").lower(),
}