Module: check_mk
Branch: master
Commit: 8d6058b4633091197d5eee249b2bb25cc79e63b3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d6058b4633091…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 16:56:24 2016 +0100
Various cleanups of unused code; Renamed some equal named vars
---
checks/hpux_if | 4 ++--
checks/jolokia_metrics | 13 -------------
checks/lsi | 4 ++--
checks/ucs_bladecenter_fans | 1 -
checks/ucs_bladecenter_psu | 6 +-----
5 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/checks/hpux_if b/checks/hpux_if
index 76fc264..e169d3c 100644
--- a/checks/hpux_if
+++ b/checks/hpux_if
@@ -67,8 +67,8 @@ def hpux_convert_to_if64(info):
nics.append(nic)
nic[2] = '6' # fake port type Ethernet
elif '=' in line:
- x = " ".join(line)
- left, right = x.split("=")
+ line_txt = " ".join(line)
+ left, right = line_txt.split("=")
left = left.strip()
right = right.strip()
if left == "PPA Number":
diff --git a/checks/jolokia_metrics b/checks/jolokia_metrics
index a45749a..0ad4b34 100644
--- a/checks/jolokia_metrics
+++ b/checks/jolokia_metrics
@@ -279,19 +279,6 @@ def inventory_jolokia_metrics_tp(info, what):
inv.append(("%s ThreadPool %s" % (inst ,tp) , levels))
return inv
-def inventory_jolokia_metrics_tp(info, what):
- inv = []
- parsed = jolokia_metrics_parse(info)
- levels = 'jolokia_metrics_tp_default_levels'
- if what == 'tp':
- needed_key = ["currentThreadsBusy", "currentThreadCount",
"maxThreads"]
- for inst, vals in parsed.iteritems():
- if vals == None:
- continue # no data from agent
- for tp, val in vals.get('tp', {}).iteritems():
- inv.append(("%s ThreadPool %s" % (inst ,tp) , levels))
- return inv
-
def check_jolokia_metrics_mem(item, params, info):
parsed = jolokia_metrics_parse(info)
diff --git a/checks/lsi b/checks/lsi
index 78838a0..d2b3959 100644
--- a/checks/lsi
+++ b/checks/lsi
@@ -40,9 +40,9 @@ def inventory_lsi(check_type, info):
disks.append((id, state))
if check_type == 'lsi.array':
- return [(id, "None") for (id, state) in arrays]
+ return [(item, "None") for (item, state) in arrays]
else:
- return [(id, '"%s"' % state) for (id, state) in disks]
+ return [(item, '"%s"' % state) for (item, state) in disks]
def check_lsi_array(item, _no_params, info):
diff --git a/checks/ucs_bladecenter_fans b/checks/ucs_bladecenter_fans
index b055fe3..e512bd4 100644
--- a/checks/ucs_bladecenter_fans
+++ b/checks/ucs_bladecenter_fans
@@ -66,7 +66,6 @@ def parse_ucs_bladecenter_fans(info):
# '----------------------------------------------------------------------'
def inventory_ucs_bladecenter_fans(parsed):
- items = set()
for key, values in parsed.items():
if "SpeedAvg" in values:
yield " ".join(key.split()[:2]), None
diff --git a/checks/ucs_bladecenter_psu b/checks/ucs_bladecenter_psu
index f6da55e..9f489f2 100644
--- a/checks/ucs_bladecenter_psu
+++ b/checks/ucs_bladecenter_psu
@@ -68,8 +68,7 @@ factory_settings["ucs_bladecenter_psu_default_levels"] = {
}
def inventory_ucs_bladecenter_psu(parsed):
- items = set([])
- for key, values in parsed.items():
+ for key in parsed.keys():
if key.startswith("Chassis"):
yield key, {}
@@ -79,8 +78,6 @@ def check_ucs_bladecenter_psu(item, params, parsed):
yield 3, "Chassis voltage info not available"
return
- info_texts = []
- state = 0
for param_key, perfname, key, text in [ ("levels_3v_", "3_3v",
"Output3v3Avg", "Output 3.3V-Average"),
("levels_12v_", "12v",
"Output12vAvg", "Output 12V-Average") ]:
voltage = float(psu[key])
@@ -121,7 +118,6 @@ check_info["ucs_bladecenter_psu"] = {
# '----------------------------------------------------------------------'
def inventory_ucs_bladecenter_psu_switch_power(parsed):
- items = set([])
for key, values in parsed.items():
if key.startswith("Switch"):
yield key, {}