Module: check_mk
Branch: master
Commit: 9fd174d4ead0b7c5ac03f92f04c66a8acb11d16c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9fd174d4ead0b7…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Dec 21 10:14:57 2016 +0100
added missing changes for werk4172
Change-Id: I4cef909293df4674d9e603a247b5dee6d65f4566
---
checks/smart | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/checks/smart b/checks/smart
index efd396d..89e04c8 100644
--- a/checks/smart
+++ b/checks/smart
@@ -178,16 +178,19 @@ check_info["smart.stats"] = {
def inventory_smart_temp(info):
disks = parse_smart_raw_values(info)
for disk_name, disk in disks.iteritems():
- if disk in [ "Temperature_Celsius", "Temperature_Internal"
]:
- yield (disk_name, {})
+ if "Temperature_Celsius" in disk or \
+ "Temperature_Internal" in disk:
+ yield disk_name, {}
def check_smart_temp(item, params, info):
disks = parse_smart_raw_values(info)
- try:
+ if "Temperature_Celsius" in disks[item]:
temperature = disks[item]["Temperature_Celsius"]
- except KeyError:
+ elif "Temperature_Internal" in disks[item]:
+ temperature = disks[item]["Temperature_Internal"]
+ else:
return
return check_temperature(temperature, params, "smart_%s" % item)