Module: check_mk
Branch: master
Commit: 71bc22c2b47e092f3f69548eb1f20ca31b6c4fcf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=71bc22c2b47e09…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Feb 1 11:02:58 2016 +0100
fixed several temperature checks that were missing the unique_name parameter
---
checks/artec_temp | 2 +-
checks/avaya_88xx | 2 +-
checks/emc_isilon_temp | 2 +-
checks/etherbox2_temp | 2 +-
checks/hp_msa_disk | 2 +-
checks/hp_msa_psu | 2 +-
checks/ipr400_temp | 2 +-
checks/janitza_umg | 3 ++-
checks/juniper_temp | 2 +-
checks/ups_modulys_battery | 7 +++++--
10 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/checks/artec_temp b/checks/artec_temp
index 9ebedb3..c32ffd5 100644
--- a/checks/artec_temp
+++ b/checks/artec_temp
@@ -38,7 +38,7 @@ def inventory_artec_temp(info):
def check_artec_temp(item, params, info):
- return check_temperature(int(info[0][0]), params)
+ return check_temperature(int(info[0][0]), params, "artec_%s" % item)
check_info['artec_temp'] = {
diff --git a/checks/avaya_88xx b/checks/avaya_88xx
index f10c55e..173e9ce 100644
--- a/checks/avaya_88xx
+++ b/checks/avaya_88xx
@@ -65,7 +65,7 @@ def check_avaya_88xx(item, params, parsed):
if len(sensors) < int(item):
return
- return check_temperature(int(sensors[int(item)]), params)
+ return check_temperature(int(sensors[int(item)]), params, "avaya_88xx_%s" %
item)
check_info["avaya_88xx"] = {
'parse_function': parse_avaya_88xx,
diff --git a/checks/emc_isilon_temp b/checks/emc_isilon_temp
index 4a39e49..a8a7e3e 100644
--- a/checks/emc_isilon_temp
+++ b/checks/emc_isilon_temp
@@ -34,7 +34,7 @@ def inventory_isilon_temp(info, is_cpu):
def check_isilon_temp(item, params, info):
for sensor_name, value in info:
if item == isilon_temp_item_name(sensor_name):
- return check_temperature(float(value), params)
+ return check_temperature(float(value), params, "isilon_%s" % item)
# Expected sensor names:
# "Temp Until CPU Throttle (CPU 0)"
diff --git a/checks/etherbox2_temp b/checks/etherbox2_temp
index e8f4eff..43098f49c 100644
--- a/checks/etherbox2_temp
+++ b/checks/etherbox2_temp
@@ -71,7 +71,7 @@ def inventory_etherbox2_temp(parsed):
def check_etherbox2_temp(item, params, parsed):
if item in parsed:
- return check_temperature(parsed[item], params)
+ return check_temperature(parsed[item], params, "etherbox2_%s" % item)
check_info['etherbox2_temp'] = {
diff --git a/checks/hp_msa_disk b/checks/hp_msa_disk
index da3590c..d98cfaa 100644
--- a/checks/hp_msa_disk
+++ b/checks/hp_msa_disk
@@ -216,7 +216,7 @@ def check_hp_msa_disk_temp(item, params, parsed):
for key, values in parsed.items():
disks.append( (key, float( values["temperature-numeric"] )) )
- return check_temperature_list(disks, params)
+ return check_temperature_list(disks, params, "hp_msa_disk_temp_%s" % item)
check_info['hp_msa_disk.temp'] = {
diff --git a/checks/hp_msa_psu b/checks/hp_msa_psu
index 4955e37..0bf4dbd 100644
--- a/checks/hp_msa_psu
+++ b/checks/hp_msa_psu
@@ -159,7 +159,7 @@ def inventory_hp_msa_psu_temp(parsed):
def check_hp_msa_psu_temp(item, params, parsed):
if item in parsed:
- return check_temperature(float(parsed[item]["dctemp"]), params)
+ return check_temperature(float(parsed[item]["dctemp"]), params,
"hp_msa_psu_temp_%s" % item)
check_info['hp_msa_psu.temp'] = {
diff --git a/checks/ipr400_temp b/checks/ipr400_temp
index 6f71f23..200f957 100644
--- a/checks/ipr400_temp
+++ b/checks/ipr400_temp
@@ -35,7 +35,7 @@ def inventory_ipr400_temp(info):
yield "Ambient", None
def check_ipr400_temp(item, params, info):
- return check_temperature(int(info[0][0]), params)
+ return check_temperature(int(info[0][0]), params, "ipr400_temp_%s" % item)
check_info["ipr400_temp"] = {
"check_function" : check_ipr400_temp,
diff --git a/checks/janitza_umg b/checks/janitza_umg
index 8faaedf..f0a4f64 100644
--- a/checks/janitza_umg
+++ b/checks/janitza_umg
@@ -189,7 +189,8 @@ def inventory_janitza_umg_temp(parsed):
def check_janitza_umg_temp(item, params, parsed):
idx = int(item) - 1
if len(parsed["Temperature"]) > idx:
- return check_temperature(float(parsed["Temperature"][idx]) / 10.0,
params)
+ return check_temperature(float(parsed["Temperature"][idx]) / 10.0,
params,
+ "janitza_umg_%s" % item)
check_info['janitza_umg.temp'] = {
diff --git a/checks/juniper_temp b/checks/juniper_temp
index 1ce8351..9abd078 100644
--- a/checks/juniper_temp
+++ b/checks/juniper_temp
@@ -53,7 +53,7 @@ def inventory_juniper_temp(parsed):
def check_juniper_temp(item, params, parsed):
if item in parsed:
- return check_temperature(parsed[item], params)
+ return check_temperature(parsed[item], params, "juniper_temp_%s" %
item)
check_info['juniper_temp'] = {
diff --git a/checks/ups_modulys_battery b/checks/ups_modulys_battery
index d7ace50..c1daaf7 100644
--- a/checks/ups_modulys_battery
+++ b/checks/ups_modulys_battery
@@ -58,7 +58,10 @@ def check_ups_modulys_battery(item, params, info):
if elapsed_sec == 0:
yield 0, "on mains"
else:
- yield 0, "discharging for %d minutes" % (elapsed_sec / 60) # TODO:
Echt OK?
+ # we already have configurable levels on remaining capacity which
+ # would be superfluous if we reported the discharging state itself
+ # as a problem. Thus this reports "OK"
+ yield 0, "discharging for %d minutes" % (elapsed_sec / 60)
# test 2: battery health
if condition == 1:
@@ -112,7 +115,7 @@ def inventory_ups_modulys_battery_temp(info):
def check_ups_modulys_battery_temp(item, params, info):
for condition, elapsed_sec, remaining_min, capacity, temperature in info:
- return check_temperature(int(temperature), params)
+ return check_temperature(int(temperature), params,
"ups_modulys_battery_temp_%s" % item)
check_info["ups_modulys_battery.temp"] = {