FreeBSD Bugzilla – Attachment 202560 Details for
Bug 236227
net-mgmt/nagios-check_smartmon for changed smartctl output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
the patched files/patch-check_smartmon file
patch-check_smartmon (text/plain), 3.94 KB, created by
Dan Langille
on 2019-03-04 20:12:38 UTC
(
hide
)
Description:
the patched files/patch-check_smartmon file
Filename:
MIME Type:
Creator:
Dan Langille
Created:
2019-03-04 20:12:38 UTC
Size:
3.94 KB
patch
obsolete
>--- check_smartmon.orig 2019-03-04 20:08:28 UTC >+++ check_smartmon >@@ -161,9 +161,12 @@ def parseOutput(healthMessage, temperatureMessage, dev > lines = healthMessage.split("\n") > getNext = 0 > for line in lines: >+ vprint(3, "parseOutput: line is: '%s'" % line) > if getNext: >- statusLine = line >- break >+ if line <> "SMART STATUS RETURN: incomplete response, ATA output registers missing" and \ >+ line <> "SMART Status not supported: Incomplete response, ATA output registers missing" : >+ statusLine = line >+ break > elif line == "=== START OF READ SMART DATA SECTION ===": > getNext = 1 > # fi >@@ -181,7 +184,7 @@ def parseOutput(healthMessage, temperatureMessage, dev > parts = line.split() > if len(parts): > # 194 is the temperature value id >- if parts[0] == "194": >+ if parts[0] == "194" or parts[0] == "190": > temperature = int(parts[9]) > break > # fi >@@ -190,9 +193,11 @@ def parseOutput(healthMessage, temperatureMessage, dev > # if devType == ata > > if devType == "scsi": >- stat_re = re.compile( r'SMART Health Status:' ) >+ vprint(3, "parseOutput: searching for 'SMART Health Status' section") >+ stat_re = re.compile( r'SMART Health Status:|SMART overall-health self-assessment test result:' ) > lines = healthMessage.split("\n") > for line in lines: >+ vprint(3, "parseOutput: line is: '%s'" % line) > if stat_re.search( line ): > parts = line.split() > healthStatus = parts[-1] >@@ -201,14 +206,20 @@ def parseOutput(healthMessage, temperatureMessage, dev > # done > > # get temperature from temperatureMessage >- stat_re = re.compile( r'Current Drive Temperature:' ) >+ temperature = 0 >+ vprint(3, "parseOutput: searching for temperature line section") >+ stat_re = re.compile( r'Current Drive Temperature:|Temperature_Celsius' ) > lines = temperatureMessage.split("\n") > for line in lines: >+ vprint(3, "parseOutput: line is: '%s'" % line) > if stat_re.search( line ): > parts = line.split() >- temperature = int(parts[-2]) >+ vprint(3, "parseOutput: we are very keen on this line: '%s'" % line) >+ temperature = int(parts[-3]) >+ vprint(3, "parseOutput: Is this the temperature? '%s'" % temperature) > break > # fi >+ > # done > > # if devType == scsi >@@ -225,6 +236,7 @@ def createReturnInfo(healthStatus, temperature, warnin > > # this is absolutely critical! > if healthStatus not in [ "PASSED", "OK" ]: >+ vprint(2, "Health status: %s" % healthStatus) > return (2, "CRITICAL: device does not pass health status") > # fi > >@@ -287,6 +299,7 @@ if __name__ == "__main__": > # check device type, ATA is default > vprint(2, "Get device type") > devtype = options.devtype >+ vprint(2, "command line supplied device type is: %s" % devtype) > if not devtype: > devtype = "ATA" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236227
:
202559
| 202560