Lines 1-6
Link Here
|
1 |
--- check_smartmon.orig 2019-03-04 20:08:28 UTC |
1 |
--- check_smartmon.orig 2019-04-09 07:09:17 UTC |
2 |
+++ check_smartmon |
2 |
+++ check_smartmon |
3 |
@@ -161,9 +161,12 @@ def parseOutput(healthMessage, temperatureMessage, dev |
3 |
@@ -161,9 +161,12 @@ def parseOutput(healthMessage, temperatu |
4 |
lines = healthMessage.split("\n") |
4 |
lines = healthMessage.split("\n") |
5 |
getNext = 0 |
5 |
getNext = 0 |
6 |
for line in lines: |
6 |
for line in lines: |
Lines 15-21
Link Here
|
15 |
elif line == "=== START OF READ SMART DATA SECTION ===": |
15 |
elif line == "=== START OF READ SMART DATA SECTION ===": |
16 |
getNext = 1 |
16 |
getNext = 1 |
17 |
# fi |
17 |
# fi |
18 |
@@ -181,7 +184,7 @@ def parseOutput(healthMessage, temperatureMessage, dev |
18 |
@@ -181,7 +184,7 @@ def parseOutput(healthMessage, temperatu |
19 |
parts = line.split() |
19 |
parts = line.split() |
20 |
if len(parts): |
20 |
if len(parts): |
21 |
# 194 is the temperature value id |
21 |
# 194 is the temperature value id |
Lines 24-30
Link Here
|
24 |
temperature = int(parts[9]) |
24 |
temperature = int(parts[9]) |
25 |
break |
25 |
break |
26 |
# fi |
26 |
# fi |
27 |
@@ -190,9 +193,11 @@ def parseOutput(healthMessage, temperatureMessage, dev |
27 |
@@ -190,9 +193,11 @@ def parseOutput(healthMessage, temperatu |
28 |
# if devType == ata |
28 |
# if devType == ata |
29 |
|
29 |
|
30 |
if devType == "scsi": |
30 |
if devType == "scsi": |
Lines 37-43
Link Here
|
37 |
if stat_re.search( line ): |
37 |
if stat_re.search( line ): |
38 |
parts = line.split() |
38 |
parts = line.split() |
39 |
healthStatus = parts[-1] |
39 |
healthStatus = parts[-1] |
40 |
@@ -201,14 +206,20 @@ def parseOutput(healthMessage, temperatureMessage, dev |
40 |
@@ -201,14 +206,20 @@ def parseOutput(healthMessage, temperatu |
41 |
# done |
41 |
# done |
42 |
|
42 |
|
43 |
# get temperature from temperatureMessage |
43 |
# get temperature from temperatureMessage |
Lines 52-58
Link Here
|
52 |
parts = line.split() |
52 |
parts = line.split() |
53 |
- temperature = int(parts[-2]) |
53 |
- temperature = int(parts[-2]) |
54 |
+ vprint(3, "parseOutput: we are very keen on this line: '%s'" % line) |
54 |
+ vprint(3, "parseOutput: we are very keen on this line: '%s'" % line) |
55 |
+ temperature = int(parts[-3]) |
55 |
+ temperature = int(parts[9]) |
56 |
+ vprint(3, "parseOutput: Is this the temperature? '%s'" % temperature) |
56 |
+ vprint(3, "parseOutput: Is this the temperature? '%s'" % temperature) |
57 |
break |
57 |
break |
58 |
# fi |
58 |
# fi |
Lines 60-66
Link Here
|
60 |
# done |
60 |
# done |
61 |
|
61 |
|
62 |
# if devType == scsi |
62 |
# if devType == scsi |
63 |
@@ -225,6 +236,7 @@ def createReturnInfo(healthStatus, temperature, warnin |
63 |
@@ -225,6 +236,7 @@ def createReturnInfo(healthStatus, tempe |
64 |
|
64 |
|
65 |
# this is absolutely critical! |
65 |
# this is absolutely critical! |
66 |
if healthStatus not in [ "PASSED", "OK" ]: |
66 |
if healthStatus not in [ "PASSED", "OK" ]: |