Module: check_mk
Branch: master
Commit: b3aab4c147b45a2f7125efb44149d0219fbbce16
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3aab4c147b45a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Aug 15 22:56:00 2011 +0200
blade_*: fix scan function for newer firmware
---
ChangeLog | 1 +
checks/blade_bays | 2 +-
checks/blade_blades | 2 +-
checks/blade_blowers | 2 +-
checks/blade_health | 2 +-
checks/blade_mediatray | 2 +-
checks/blade_powerfan | 2 +-
checks/blade_powermod | 2 +-
8 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d2da9ee..8f87d09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* FIX: windows agent: hopefully fix case with quotes in directory name
* FIX: printer_supply: fixed logic of Perf-O-Meter (mixed up crit with ok)
* FIX: Solaris agent: reset localization to C, fixes problems with statgrab
+ * FIX: blade_*: fix SNMP scan function for newer firmwares (thanks to Carlos Peón)
* snmp_uptime, snmp_info: added scan functions. These checks will now
always be added. Please use ingored_checktypes to disable, if non needed.
* brocade_port: check for Brocade FC ports has been rewritten with
diff --git a/checks/blade_bays b/checks/blade_bays
index 8532148..9d1c409 100644
--- a/checks/blade_bays
+++ b/checks/blade_bays
@@ -55,4 +55,4 @@ check_info['blade_bays'] = (check_blade_bays, "BAY
%s", 0, inventory_blade_bays
snmp_info['blade_bays'] = ( ".1.3.6.1.4.1.2.3.51.2.2.10.2.1.1", [ 5, 6,
2, 1 ] ) # BLADE-MIB
snmp_scan_functions['blade_bays'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_blades b/checks/blade_blades
index 5fa5733..7223804 100644
--- a/checks/blade_blades
+++ b/checks/blade_blades
@@ -74,4 +74,4 @@ snmp_info['blade_blades'] = (
".1.3.6.1.4.1.2.3.51.2.22.1.5.1.1", [ # BLADE-MIB
])
snmp_scan_functions['blade_blades'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_blowers b/checks/blade_blowers
index 1884e41..7d00a01 100644
--- a/checks/blade_blowers
+++ b/checks/blade_blowers
@@ -101,4 +101,4 @@ check_info['blade_blowers'] = ( check_blade_blowers,
"Blower %s", 1, inventory_b
snmp_info['blade_blowers'] = ( ".1.3.6.1.4.1.2.3.51.2.2", [3] )
snmp_scan_functions['blade_blowers'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_health b/checks/blade_health
index 6444096..39aa479 100644
--- a/checks/blade_health
+++ b/checks/blade_health
@@ -51,4 +51,4 @@ check_info['blade_health'] = ( check_blade_health, "Summary
health state", 0, in
snmp_info['blade_health'] = ( ".1.3.6.1.4.1.2.3.51.2.2.7", [
'1', '2.1.3.1' ])
snmp_scan_functions['blade_health'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_mediatray b/checks/blade_mediatray
index 8c7e5fc..ca8d7a9 100644
--- a/checks/blade_mediatray
+++ b/checks/blade_mediatray
@@ -46,4 +46,4 @@ check_info['blade_mediatray'] = ( check_blade_mediatray,
"Media tray", 0, invent
snmp_info['blade_mediatray'] = ( ".1.3.6.1.4.1.2.3.51.2.2.5.2", [74,
75])
snmp_scan_functions['blade_mediatray'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_powerfan b/checks/blade_powerfan
index da45933..19383c5 100644
--- a/checks/blade_powerfan
+++ b/checks/blade_powerfan
@@ -54,4 +54,4 @@ check_info['blade_powerfan'] = (check_blade_powerfan,
"Power Module Cooling Devi
snmp_info['blade_powerfan'] = ( ".1.3.6.1.4.1.2.3.51.2.2.6.1.1", [ 1,
2, 3, 4, 5, 6, 7 ] ) # BLADE-MIB
snmp_scan_functions['blade_powerfan'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))
diff --git a/checks/blade_powermod b/checks/blade_powermod
index a5c1174..8593154 100644
--- a/checks/blade_powermod
+++ b/checks/blade_powermod
@@ -45,4 +45,4 @@ check_info['blade_powermod'] = (check_blade_powermod,
"Power Module %s", 0, inve
snmp_info['blade_powermod'] = ( ".1.3.6.1.4.1.2.3.51.2.2.4.1.1", [ 1,
2, 3, 4 ]) # BLADE-MIB
snmp_scan_functions['blade_powermod'] = \
- lambda oid: oid(".1.3.6.1.2.1.1.1.0") == 'BladeCenter Management
Module'
+ lambda oid: re.match('BladeCenter( Advanced)* Management Module',
oid(".1.3.6.1.2.1.1.1.0"))