Bug 236227 - net-mgmt/nagios-check_smartmon for changed smartctl output
Summary: net-mgmt/nagios-check_smartmon for changed smartctl output
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dan Langille
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-04 20:10 UTC by Dan Langille
Modified: 2019-05-23 14:01 UTC (History)
3 users (show)

See Also:
ports: maintainer-feedback+
koobs: merge-quarterly+


Attachments
patch to the port (4.43 KB, patch)
2019-03-04 20:10 UTC, Dan Langille
no flags Details | Diff
the patched files/patch-check_smartmon file (3.94 KB, patch)
2019-03-04 20:12 UTC, Dan Langille
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Langille freebsd_committer freebsd_triage 2019-03-04 20:10:36 UTC
Created attachment 202559 [details]
patch to the port

The patches are still not complete.

smartctl output varies.

This is a SATA devices, which because of camcontrol, appears as a SCSI device when connected to an HBA as da3:

194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       43 (Min/Max 7/60)

This is also a SATA device, which is connected directly to the motherboard as ada0:

194 Temperature_Internal    0x0022   100   100   000    Old_age   Always       -       25


The attached patch attempts to do the right thing, even when attribute 194 is not present.
Comment 1 Dan Langille freebsd_committer freebsd_triage 2019-03-04 20:12:38 UTC
Created attachment 202560 [details]
the patched files/patch-check_smartmon file

I have also uploaded files/patch-check_smartmon after it has been patched.
Comment 2 Krzysztof 2019-03-04 22:45:47 UTC
Comment on attachment 202559 [details]
patch to the port

ok
Comment 3 Krzysztof 2019-03-04 22:46:13 UTC
For me it is OK.
Comment 4 Dan Langille freebsd_committer freebsd_triage 2019-03-04 22:52:26 UTC
I am trying to keep this backwards compatible.  I would feel better committing this after I run it for a bit longer at home.  It's on all my servers.

I'd also like to have feedback from others using the patch in the field.

I'm hoping Pierre Guinoiseau gets back to me

re: https://lists.freebsd.org/pipermail/svn-ports-all/2019-February/208453.html
Comment 5 Pierre Guinoiseau 2019-03-08 21:04:46 UTC
The patch works for me!

On a server with real disks:

  $ sudo python2.7 /usr/local/libexec/nagios/check_smartmon -w 45 -c 60 -d /dev/ada0
  OK: device is functional and stable (temperature: 39)

On a virtual machine with a virtual disk:

  $ sudo python2.7 /usr/local/libexec/nagios/check_smartmon -w 45 -c 60 -d /dev/da0
  OK: device is functional and stable (temperature: 0)

Thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-03-08 22:00:37 UTC
A commit references this bug:

Author: dvl
Date: Fri Mar  8 21:59:56 UTC 2019
New revision: 495081
URL: https://svnweb.freebsd.org/changeset/ports/495081

Log:
  Catch up with smartctl changes while retaining old behaviour.

  PR:		236227
  Approved by:	 Krzysztof <ports@bsdserwis.com> (maintainer)
  MFH:		2019Q1

Changes:
  head/net-mgmt/nagios-check_smartmon/Makefile
  head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon
Comment 7 Dan Langille freebsd_committer freebsd_triage 2019-03-08 23:48:13 UTC
Thank you for your help.
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-03-09 23:27:10 UTC
A commit references this bug:

Author: dvl
Date: Sat Mar  9 23:26:08 UTC 2019
New revision: 495215
URL: https://svnweb.freebsd.org/changeset/ports/495215

Log:
  MFH: r495081

  Catch up with smartctl changes while retaining old behaviour.

  PR:		236227
  Approved by:	 Krzysztof <ports@bsdserwis.com> (maintainer)

  Approved by:	ports-secteam (miwi)

Changes:
_U  branches/2019Q1/
  branches/2019Q1/net-mgmt/nagios-check_smartmon/Makefile
  branches/2019Q1/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon