Module: check_mk
Branch: master
Commit: d7ead88d23eafc910dc251c9ef4df04c02e67f7a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d7ead88d23eafc…
Author: Bernhard Schmidt <bschmidt(a)teleport-iabg.de>
Date: Thu Nov 24 22:49:36 2011 +0000
FIX: smart check now actually checks thresholds
---
ChangeLog | 1 +
checks/smart | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ed9ab64..c99cd86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,6 +117,7 @@
* FIX: netapp_*: scan functions now detect IBM versions of firmware
* FIX: bluecoat_diskcpu: repair scan function
* FIX: mem.vmalloc: fix default levels (32 and 64 was swapped)
+ * FIX: smart: make levels work (thanks to Bernhard Schmidt)
1.1.12p4:
Multisite:
diff --git a/checks/smart b/checks/smart
index 76cd9df..42aa556 100644
--- a/checks/smart
+++ b/checks/smart
@@ -102,10 +102,10 @@ def check_smart_stats(item, params, info):
if line[4] == lab:
warn, crit, cur_status, thresh_out = None, None, 0, ''
- if thresh and thresh + '_crit' in params and value >=
params[thresh][1]:
+ if thresh in params and value >= params[thresh][1]:
cur_status = 2
thresh_out = '(!!)'
- elif thresh and thresh + '_warn' in params and value >=
params[thresh][0]:
+ elif thresh in params and value >= params[thresh][0]:
cur_status = 1
thresh_out = '(!)'