[Bug 236873] net-mgmt/nagios-check_smartmon: device-depended temperature response causes ValueError
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Mar 29 09:52:53 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236873
Bug ID: 236873
Summary: net-mgmt/nagios-check_smartmon: device-depended
temperature response causes ValueError
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: freebsd at eckieck.de
CC: ports at bsdserwis.com
Flags: maintainer-feedback?(ports at bsdserwis.com)
CC: ports at bsdserwis.com
Created attachment 203237
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203237&action=edit
change parts-index from -3 to 9 for temperature
After upgrading to version 20100318_4 i get a ValueError for some disks. I
think this is caused by the changes base r495215 from bug #236227 because of a
slightly different temperature readings, e.g missing values in parantheses:
WDC WD40EFRX-68N32N0 causes the error:
# /usr/local/libexec/nagios/check_smartmon -d /dev/da1 -v 10
..
parseOutput: we are very keen on this line: '194 Temperature_Celsius
0x0022 121 117 000 Old_age Always - 29'
Traceback (most recent call last):
File "/usr/local/libexec/nagios/check_smartmon", line 317, in <module>
(healthStatus, temperature) = parseOutput(healthStatusOutput,
temperatureOutput, devtype)
File "/usr/local/libexec/nagios/check_smartmon", line 218, in parseOutput
temperature = int(parts[-3])
ValueError: invalid literal for int() with base 10: 'Always'
While ST4000VN008-2DR166 works:
# /usr/local/libexec/nagios/check_smartmon -d /dev/da0 -v 10
..
parseOutput: we are very keen on this line: '194 Temperature_Celsius
0x0022 027 040 000 Old_age Always - 27 (0 19 0 0 0)'
parseOutput: Is this the temperature? '0'
Health status: PASSED
..
My temp workaround was to dumb change parts-index on line 218 from -3 to 9
which results in correct temperature-readings and no error.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list