Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Mar 2019 09:52:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 236873] net-mgmt/nagios-check_smartmon: device-depended temperature response causes ValueError
Message-ID:  <bug-236873-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236873

            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@FreeBSD.org
          Reporter: freebsd@eckieck.de
                CC: ports@bsdserwis.com
             Flags: maintainer-feedback?(ports@bsdserwis.com)
                CC: ports@bsdserwis.com

Created attachment 203237
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D203237&action=
=3Dedit
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 o=
f 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=20=
=20=20=20
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) =3D parseOutput(healthStatusOutput,
temperatureOutput, devtype)
    File "/usr/local/libexec/nagios/check_smartmon", line 218, in parseOutp=
ut
      temperature =3D 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=20=
=20=20=20
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236873-7788>