From owner-svn-ports-all@freebsd.org Tue Feb 19 13:35:49 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F2C114F169C; Tue, 19 Feb 2019 13:35:49 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 168CC87F09; Tue, 19 Feb 2019 13:35:49 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B41F71E73A; Tue, 19 Feb 2019 13:35:48 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1JDZmpK065881; Tue, 19 Feb 2019 13:35:48 GMT (envelope-from dvl@FreeBSD.org) Received: (from dvl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1JDZmMw065879; Tue, 19 Feb 2019 13:35:48 GMT (envelope-from dvl@FreeBSD.org) Message-Id: <201902191335.x1JDZmMw065879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dvl set sender to dvl@FreeBSD.org using -f From: Dan Langille Date: Tue, 19 Feb 2019 13:35:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r493370 - in branches/2019Q1/net-mgmt/nagios-check_smartmon: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: dvl X-SVN-Commit-Paths: in branches/2019Q1/net-mgmt/nagios-check_smartmon: . files X-SVN-Commit-Revision: 493370 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 168CC87F09 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 13:35:49 -0000 Author: dvl Date: Tue Feb 19 13:35:48 2019 New Revision: 493370 URL: https://svnweb.freebsd.org/changeset/ports/493370 Log: MFH: r493266 Patch check_smartmon to cater for changed smartctl output We previously patched the code to look for: SMART STATUS RETURN: incomplete response, ATA output registers missing That line is now: SMART Status not supported: Incomplete response, ATA output registers missing It also seems like the temperature has moved from part 190 to 194. PR: 235475 Approved by: Krzysztof (maintainer) Approved by: ports-secteam (miwi) Modified: branches/2019Q1/net-mgmt/nagios-check_smartmon/Makefile branches/2019Q1/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon Directory Properties: branches/2019Q1/ (props changed) Modified: branches/2019Q1/net-mgmt/nagios-check_smartmon/Makefile ============================================================================== --- branches/2019Q1/net-mgmt/nagios-check_smartmon/Makefile Tue Feb 19 13:24:31 2019 (r493369) +++ branches/2019Q1/net-mgmt/nagios-check_smartmon/Makefile Tue Feb 19 13:35:48 2019 (r493370) @@ -3,7 +3,7 @@ PORTNAME= check_smartmon PORTVERSION= 20100318 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MASTER_SITES= http://ftp.bsdserwis.com/pub/FreeBSD/ports/distfiles/ PKGNAMEPREFIX= nagios- Modified: branches/2019Q1/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon ============================================================================== --- branches/2019Q1/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon Tue Feb 19 13:24:31 2019 (r493369) +++ branches/2019Q1/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon Tue Feb 19 13:35:48 2019 (r493370) @@ -1,26 +1,42 @@ ---- check_smartmon.orig 2015-07-22 17:32:58 UTC -+++ check_smartmon -@@ -59,7 +59,7 @@ def parseCmdLine(args): - metavar="LEVEL", help="set verbosity level to LEVEL; defaults to 0 (quiet), \ - possible values go up to 3") - parser.add_option("-t", "--type", action="store", dest="devtype", default="ata", metavar="DEVTYPE", -- help="type of device (ATA|SCSI)") -+ help="type of device (ata|scsi)") - parser.add_option("-w", "--warning-threshold", metavar="TEMP", action="store", - type="int", dest="warningThreshold", default=55, - help="set temperature warning threshold to given temperature (defaults to 55)") -@@ -291,10 +291,10 @@ if __name__ == "__main__": +--- check_smartmon.orig 2019-02-01 04:28:13.000000000 +0000 ++++ check_smartmon 2019-02-04 22:27:35.297345000 +0000 +@@ -161,9 +161,12 @@ + 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 @@ + 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 +@@ -225,6 +228,7 @@ + + # 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 +291,7 @@ + # 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" -- -- if device_re.search( device ): -- devtype = "scsi" -+ if device_re.search( device ): -+ devtype = "scsi" -+ else: -+ devtype = "ata" - - vprint(1, "Device type: %s" % devtype) - + if device_re.search( device ): + devtype = "scsi"