Module: check_mk
Branch: master
Commit: 3d569aaf07275eda20712f8433d38ce0ba777fc0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d569aaf07275e…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Wed Aug 22 15:37:02 2012 +0200
checks/smart: handle cases where disks report non-integer numbers. (Thanks to Philippe
Pepiot)
---
checks/smart | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/checks/smart b/checks/smart
index 1cd3382..f8c06c1 100644
--- a/checks/smart
+++ b/checks/smart
@@ -86,7 +86,7 @@ def check_smart_stats(item, params, info):
if len(line) != 13 or line[0] != item:
continue
- value = int(line[12])
+ value = int(line[12].split("/", 1)[0])
for val, uom, lab, txt, thresh in [
(value, ' hours', 'Power_On_Hours',
'Powered on', None),
(value, '', 'Power_Cycle_Count',
'Power cycles', None),