summaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorCraig Leres <leres@FreeBSD.org>2022-08-19 17:23:05 -0700
committerCraig Leres <leres@FreeBSD.org>2022-08-19 17:23:05 -0700
commitc45c42db6b0e42c14360830ea6cdd96231bbdf05 (patch)
tree3ae7514aafc53feb02262351e5a9499cecb4d671 /net-mgmt
parentfb0d80d4eb2302a88e84f66af32c2378ab50291a (diff)
downloadfreebsd-ports-c45c42db6b0e42c14360830ea6cdd96231bbdf05.zip
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
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/check_nwc_health/Makefile9
-rw-r--r--net-mgmt/check_nwc_health/files/patch-GLPlugin_lib_Monitoring_GLPlugin_SNMP.pm16
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;