Module: check_mk
Branch: master
Commit: 1bd049bc3279cf915290e616542adfc726317cea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1bd049bc3279cf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 19 17:48:29 2015 +0200
Fixed exceptions in several SNMP scan functions
---
checks/emerson_stat | 2 +-
checks/emerson_temp | 2 +-
checks/etherbox | 2 +-
checks/hp_proliant_cpu | 2 +-
checks/hp_proliant_da_cntlr | 2 +-
checks/hp_proliant_da_phydrv | 2 +-
checks/hp_proliant_fans | 2 +-
checks/hp_proliant_mem | 2 +-
checks/hp_proliant_power | 2 +-
checks/hp_proliant_psu | 2 +-
checks/hp_proliant_raid | 2 +-
checks/hp_proliant_temp | 2 +-
checks/hp_sts_drvbox | 2 +-
checks/ups_bat_temp | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/checks/emerson_stat b/checks/emerson_stat
index dd401b3..62d897e 100644
--- a/checks/emerson_stat
+++ b/checks/emerson_stat
@@ -85,5 +85,5 @@ check_info['emerson_stat'] = {
"service_description" : "Status",
"has_perfdata" : False,
"snmp_info" : ( ".1.3.6.1.4.1.6302.2.1.2.1",
["0"] ),
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.6302.2.1.1.1.0').startswith('Emerson Network Power'),
+ "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.6302.2.1.1.1.0', "").startswith('Emerson Network
Power'),
}
diff --git a/checks/emerson_temp b/checks/emerson_temp
index 7f24def..1758eb6 100644
--- a/checks/emerson_temp
+++ b/checks/emerson_temp
@@ -62,6 +62,6 @@ check_info['emerson_temp'] = {
"has_perfdata" : True,
"group" : "hw_temperature",
"snmp_info" : ( ".1.3.6.1.4.1.6302.2.1.2",
["7"] ),
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.6302.2.1.1.1.0').startswith('Emerson Network Power'),
+ "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.6302.2.1.1.1.0', "").startswith('Emerson Network
Power'),
"includes" : [ "temperature.include" ],
}
diff --git a/checks/etherbox b/checks/etherbox
index fef4c54..e377683 100644
--- a/checks/etherbox
+++ b/checks/etherbox
@@ -71,7 +71,7 @@ def etherbox_scan(oid):
# .1.3.6.1.2.1. (sysDescr). Yurks. We need to fetch
# a vendor specific OID here and wait until all old devices
# have vanished.
- return oid(".1.3.6.1.4.1.14848.2.1.1.1.0").startswith("Version")
+ return oid(".1.3.6.1.4.1.14848.2.1.1.1.0",
"").startswith("Version")
etherbox_info = [
( ".1.3.6.1.4.1.14848.2.1.1.3", [ '' ]), # temperature
unit
diff --git a/checks/hp_proliant_cpu b/checks/hp_proliant_cpu
index 06d9bc1..47a9766 100644
--- a/checks/hp_proliant_cpu
+++ b/checks/hp_proliant_cpu
@@ -57,5 +57,5 @@ check_info["hp_proliant_cpu"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_da_cntlr b/checks/hp_proliant_da_cntlr
index 24e7d6e..ad9f295 100644
--- a/checks/hp_proliant_da_cntlr
+++ b/checks/hp_proliant_da_cntlr
@@ -97,5 +97,5 @@ check_info["hp_proliant_da_cntlr"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_da_phydrv b/checks/hp_proliant_da_phydrv
index e58dbed..5de5f0e 100644
--- a/checks/hp_proliant_da_phydrv
+++ b/checks/hp_proliant_da_phydrv
@@ -90,5 +90,5 @@ check_info["hp_proliant_da_phydrv"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_fans b/checks/hp_proliant_fans
index 347a828..732620c 100644
--- a/checks/hp_proliant_fans
+++ b/checks/hp_proliant_fans
@@ -96,5 +96,5 @@ check_info["hp_proliant_fans"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_mem b/checks/hp_proliant_mem
index 16994d1..466be36 100644
--- a/checks/hp_proliant_mem
+++ b/checks/hp_proliant_mem
@@ -164,5 +164,5 @@ check_info["hp_proliant_mem"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_power b/checks/hp_proliant_power
index 4031b3b..b837ce6 100644
--- a/checks/hp_proliant_power
+++ b/checks/hp_proliant_power
@@ -63,6 +63,6 @@ check_info["hp_proliant_power"] = {
]
),
'snmp_scan_function' : \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
'has_perfdata' : True
}
diff --git a/checks/hp_proliant_psu b/checks/hp_proliant_psu
index d8c4dab..ea725ba 100644
--- a/checks/hp_proliant_psu
+++ b/checks/hp_proliant_psu
@@ -60,5 +60,5 @@ check_info["hp_proliant_psu"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_raid b/checks/hp_proliant_raid
index 669d27a..c7ccdea 100644
--- a/checks/hp_proliant_raid
+++ b/checks/hp_proliant_raid
@@ -74,5 +74,5 @@ check_info["hp_proliant_raid"] = {
]
),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/hp_proliant_temp b/checks/hp_proliant_temp
index f7dedd2..9fbc5ef 100644
--- a/checks/hp_proliant_temp
+++ b/checks/hp_proliant_temp
@@ -79,6 +79,6 @@ check_info["hp_proliant_temp"] = {
"6", # cpqHeTemperatureCondition
] ),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
'group': 'temperature_auto',
}
diff --git a/checks/hp_sts_drvbox b/checks/hp_sts_drvbox
index a4a918d..f483fe8 100644
--- a/checks/hp_sts_drvbox
+++ b/checks/hp_sts_drvbox
@@ -131,5 +131,5 @@ check_info["hp_sts_drvbox"] = {
'23', # cpqSsBoxLocationString
]),
'snmp_scan_function': \
- lambda oid: "proliant" in
oid(".1.3.6.1.4.1.232.2.2.4.2.0").lower(),
+ lambda oid: "proliant" in oid(".1.3.6.1.4.1.232.2.2.4.2.0",
"").lower(),
}
diff --git a/checks/ups_bat_temp b/checks/ups_bat_temp
index 830c59a..8a29847 100644
--- a/checks/ups_bat_temp
+++ b/checks/ups_bat_temp
@@ -54,6 +54,6 @@ check_info['ups_bat_temp'] = {
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.818.1.100.1.1",
".1.3.6.1.4.1.705.1.2", ".1.3.6.1.2.1.33.2",
".1.3.6.1.4.1.818.1.100.1.2" ] \
or
oid(".1.3.6.1.2.1.1.2.0").startswith('.1.3.6.1.2.1.33') \
- or
oid('.1.3.6.1.2.1.33.1.1.1.0').startswith('RPS'),
+ or oid('.1.3.6.1.2.1.33.1.1.1.0',
"").startswith('RPS'),
"includes" : [ "temperature.include" ],
}