From nobody Sat Aug 20 00:23:40 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M8fVh5Rnfz4ZbcD; Sat, 20 Aug 2022 00:23:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M8fVh4zNjz40rH; Sat, 20 Aug 2022 00:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660955020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2S22dqFYsqDecRovAhRqEsX2udZetKCKxaBmdqLGGWA=; b=afCIdO8ymoQ0CuXE4BvJbp8mALAHdwGMraZ2yJEabSIeLhYfs2gZ0xYyXzBlccNFZJitc1 hRTAsECeiVbLtGNIgMBF3AwsBUg0ILMmsxlSZ7dp3eFwz4hCRbz0PbwdEkfbA3J6Sd4kNK uPxyRRUHqPC1ZaYsKK2bgUkzf+TBOZ6zS2bzCSqCBZQ2B3kM+71cwxqhEJx3nfdkvc24Ih 2blCIdQhBzTaZ3iWpk5urDxeMSXQdTW31RE6ia5tT+YmDZIwQQu/kMXJ0U/I7ohtS7J8OY lRt9puBuwrV5G+cf+UWNNdgZ4vpMdI38JqGA+mma1g5ML8GMX+0AJ4VwlmEjyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M8fVh3kl9z1BvJ; Sat, 20 Aug 2022 00:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27K0Ne3E037833; Sat, 20 Aug 2022 00:23:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27K0NeZ3037832; Sat, 20 Aug 2022 00:23:40 GMT (envelope-from git) Date: Sat, 20 Aug 2022 00:23:40 GMT Message-Id: <202208200023.27K0NeZ3037832@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Craig Leres Subject: git: c45c42db6b0e - main - net-mgmt/check_nwc_health: Patch to adjust snmp timeout and retries List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: leres X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c45c42db6b0e42c14360830ea6cdd96231bbdf05 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660955020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2S22dqFYsqDecRovAhRqEsX2udZetKCKxaBmdqLGGWA=; b=A5BcNY33Wly50VgkJSLfga+CkmTYTjz5BhX/RGlLpfakYjfthQYXEZQf13XUT36vWbSE6n KNKGZgQt0yMPD5jjg22XgDlDtXaO2c5RAi81TD8b6T2bWFeApfE/wSeYedlhU5ky/doRxo mAN+0sbLU4KU8XEm0CmXPNxkuWf3d064eD+Bta8iAmoi3OMlbrI8OkUjirhQ06JcTpx8/m EXwMqz4LKR4vGgG3M73z98pI8hYQxUsLon49vRgQjPCHMkrpyOtHQxzVmAemPD+iwPUHvi i+GyX95EOgOnZauCqq476wS+lu+XDtkzk1tsB3Q/gheiCcVtfH52znyYNWhXyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660955020; a=rsa-sha256; cv=none; b=ld4vKD/rY+CAqDQW1Wc5dkcoItZAjXlyCXtkqE7V9BhB3MgYHNYLgoZdYivVabOyDRTbL4 iDVrEHtfEpGYwHSuTSGpTgqOzdy+IZkzLq+lHZMDpoKFrpzAEdPDm1ES99LckvlURHpsEg RGuw3O1r/zFlzIUUs9P1y/Y1RMrTUraK0fMQexq+GfGc8FUWXMpe5NcGx44/Kn+8LASbx/ kxnSiF5yzKSUBcoeTV0pELe4mXVKn9fGDpUaXsYgdcM51n752fk3lkkIkf9lDjUSMeyirb YUbUc/HYWRQeoegDAux1TBOi+9fLAC8jFb7NohVBH6NZS4+GXI1h80HEBP+mEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/ports/commit/?id=c45c42db6b0e42c14360830ea6cdd96231bbdf05 commit c45c42db6b0e42c14360830ea6cdd96231bbdf05 Author: Craig Leres AuthorDate: 2022-08-20 00:23:05 +0000 Commit: Craig Leres CommitDate: 2022-08-20 00:23:05 +0000 net-mgmt/check_nwc_health: Patch to adjust snmp timeout and retries .. as described in this github issue: https://github.com/lausser/check_nwc_health/issues/221 Minor portlint while we're here. Reported by: Case Larsen --- net-mgmt/check_nwc_health/Makefile | 9 +++++---- .../files/patch-GLPlugin_lib_Monitoring_GLPlugin_SNMP.pm | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/net-mgmt/check_nwc_health/Makefile b/net-mgmt/check_nwc_health/Makefile index 19ff04a347a2..f63fd47ac685 100644 --- a/net-mgmt/check_nwc_health/Makefile +++ b/net-mgmt/check_nwc_health/Makefile @@ -1,5 +1,6 @@ PORTNAME= check_nwc_health PORTVERSION= 10.3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://labs.consol.de/assets/downloads/nagios/ @@ -9,6 +10,10 @@ COMMENT= Nagios plugin to monitor network equipment via SNMP LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING +RUN_DEPENDS= p5-File-Slurp>=0:devel/p5-File-Slurp \ + p5-JSON-XS>=4.0:converters/p5-JSON-XS \ + p5-JSON>=4.0:converters/p5-JSON + USES= perl5 GNU_CONFIGURE= yes @@ -22,10 +27,6 @@ NAGIOSGROUP?= nagios USERS= ${NAGIOSUSER} GROUPS= ${NAGIOSGROUP} -RUN_DEPENDS= p5-File-Slurp>=0:devel/p5-File-Slurp \ - p5-JSON-XS>=4.0:converters/p5-JSON-XS \ - p5-JSON>=4.0:converters/p5-JSON - PLIST_FILES= libexec/check_nwc_health post-patch: diff --git a/net-mgmt/check_nwc_health/files/patch-GLPlugin_lib_Monitoring_GLPlugin_SNMP.pm b/net-mgmt/check_nwc_health/files/patch-GLPlugin_lib_Monitoring_GLPlugin_SNMP.pm new file mode 100644 index 000000000000..d2fafb3e7dd1 --- /dev/null +++ b/net-mgmt/check_nwc_health/files/patch-GLPlugin_lib_Monitoring_GLPlugin_SNMP.pm @@ -0,0 +1,16 @@ +--- GLPlugin/lib/Monitoring/GLPlugin/SNMP.pm.orig 2022-08-19 23:52:28 UTC ++++ GLPlugin/lib/Monitoring/GLPlugin/SNMP.pm +@@ -1173,8 +1173,11 @@ sub establish_snmp_session { + # removing this at all may cause strange epn errors. As if only + # certain oids were returned as undef, others not. + # next try: 50 +- $params{'-timeout'} = $self->opts->timeout() >= 60 ? +- 50 : $self->opts->timeout() - 2; ++ ##$params{'-timeout'} = $self->opts->timeout() >= 60 ? ++ ## 50 : $self->opts->timeout() - 2; ++ # LBL: we don't use WLC, and if this is WLC specific, we should limit to just WLC ++ $params{'-timeout'} = 5; ++ $params{'-retries'} = 3; + my $stderrvar = ""; + *SAVEERR = *STDERR; + open ERR ,'>',\$stderrvar;