Module: check_mk
Branch: master
Commit: 4c210705a773934d3300decd098c5aee38b0da0d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c210705a77393…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Mar 27 15:47:31 2017 +0200
4550 FIX smart: the services do not crash anymore if a threshold is not provided
Change-Id: I2006fcde0b5e93650315aeda306f71d5cbce67fa
---
.werks/4550 | 10 ++++++++++
checks/smart | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4550 b/.werks/4550
new file mode 100644
index 0000000..6a79b64
--- /dev/null
+++ b/.werks/4550
@@ -0,0 +1,10 @@
+Title: smart: the services do not crash anymore if a threshold is not provided
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1490622387
+Class: fix
+
+
diff --git a/checks/smart b/checks/smart
index 89e04c8..6d457e7 100644
--- a/checks/smart
+++ b/checks/smart
@@ -91,7 +91,10 @@ def parse_smart_normalized_values(info):
field = line[4]
if field != "Unknown_Attribute":
value = int(line[6])
- threshold = int(line[8])
+ if isinstance(line[8], int):
+ threshold = int(line[8])
+ else:
+ threshold = None
disk[field] = value, threshold
return disks