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,38 +1,39 @@ PORTNAME= check_nwc_health PORTVERSION= 10.3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://labs.consol.de/assets/downloads/nagios/ MAINTAINER= leres@FreeBSD.org 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 CONFIGURE_ARGS= --prefix=${PREFIX} \ --with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-perl=${PERL} NAGIOSUSER?= nagios 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: ${REINPLACE_CMD} -e "s| /bin/sed| ${SED}|" -e "s| /bin/grep| ${GREP}|" \ ${WRKSRC}/plugins-scripts/Makefile.in # Remove unused expression that is problematic for pkg-fallout # under 12.3 but causes no problems anywhere else ${REINPLACE_CMD} -e "/@AWK@/d" ${WRKSRC}/plugins-scripts/subst.in .include 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;