update to snmp_exporter-0.21.0
This commit is contained in:
parent
9c6e8e431c
commit
e4d1aab383
|
@ -2,9 +2,8 @@ COMMENT= Prometheus exporter for SNMP metrics
|
|||
|
||||
# updating: bump V version, "make patch" (fix patches if needed),
|
||||
# "make mibs", update M version, "make makesum".
|
||||
V= 0.20.0
|
||||
M= 0.20.0
|
||||
REVISION= 1
|
||||
V= 0.21.0
|
||||
M= 0.21.0
|
||||
GH_ACCOUNT= prometheus
|
||||
GH_PROJECT= snmp_exporter
|
||||
GH_TAGNAME= v$V
|
||||
|
@ -61,8 +60,8 @@ do-test:
|
|||
|
||||
mibs: patch
|
||||
${_PBUILD} ln -fs ${LOCALBASE}/bin/gtar ${WRKDIR}/bin/tar
|
||||
cd ${WRKDIR}/snmp_exporter-$V; \
|
||||
${_PBUILD} chmod ug=rwX,o=rX . generator go.mod go.sum; \
|
||||
set -x; cd ${WRKDIR}/snmp_exporter-$V; \
|
||||
${_PBUILD} chmod -R ug=rwX,o=rX .; \
|
||||
go mod tidy; \
|
||||
go mod vendor; \
|
||||
PATH=${WRKDIR}/bin:$$PATH gmake -C generator; \
|
||||
|
@ -70,7 +69,7 @@ mibs: patch
|
|||
tar cf - vendor generator/mibs | xz > $$mibs; \
|
||||
chmod 644 $$mibs; \
|
||||
scp $$mibs naiad:mirrors/snmp_exporter_mibs+vendor-$V.tar.xz; \
|
||||
rm $$mibs; chmod -R g=rwX generator/mibs
|
||||
rm $$mibs; chmod -R ug=rwX generator
|
||||
${_PBUILD} rm -f ${WRKDIR}/bin/tar
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SHA256 (snmp_exporter-0.20.0.tar.gz) = QyZ0n7NrgpykPp1g/An0O2J4jzU8SRqjNncF1SuW+uk=
|
||||
SHA256 (snmp_exporter_mibs+vendor-0.20.0.tar.xz) = 1aC1YeU02723h4j8eN21rQTIQU4SU8aHHiDayknfpx4=
|
||||
SIZE (snmp_exporter-0.20.0.tar.gz) = 290899
|
||||
SIZE (snmp_exporter_mibs+vendor-0.20.0.tar.xz) = 7455304
|
||||
SHA256 (snmp_exporter-0.21.0.tar.gz) = pu0xqP1yOox9KID9Idk/0smuJPpP3rODTnLczYo+H7M=
|
||||
SHA256 (snmp_exporter_mibs+vendor-0.21.0.tar.xz) = DzLCoHNzYu/KiXmJBrvUZL9k2kPAOr2N7NfBJqRIRYU=
|
||||
SIZE (snmp_exporter-0.21.0.tar.gz) = 322098
|
||||
SIZE (snmp_exporter_mibs+vendor-0.21.0.tar.xz) = 1900896
|
||||
|
|
|
@ -2,22 +2,11 @@ We're not actually fetching in the port build; but this may be needed
|
|||
during port updates to generate a tar of common mibs, so it's useful to
|
||||
fix so it works if needed.
|
||||
|
||||
Cisco's ftp server can be flaky so use a mirror.
|
||||
|
||||
Index: generator/Makefile
|
||||
--- generator/Makefile.orig
|
||||
+++ generator/Makefile
|
||||
@@ -22,7 +22,7 @@ DOCKER_REPO ?= prom
|
||||
|
||||
APC_URL := 'https://download.schneider-electric.com/files?p_File_Name=powernet432.mib'
|
||||
ARISTA_URL := https://www.arista.com/assets/data/docs/MIBS
|
||||
-CISCO_URL := 'ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz'
|
||||
+CISCO_URL := https://spacehopper.org/mirrors/cisco_v2.tar.gz
|
||||
IANA_CHARSET_URL := https://www.iana.org/assignments/ianacharset-mib/ianacharset-mib
|
||||
IANA_IFTYPE_URL := https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib
|
||||
IANA_PRINTER_URL := https://www.iana.org/assignments/ianaprinter-mib/ianaprinter-mib
|
||||
@@ -110,7 +110,7 @@ mibs: mib-dir \
|
||||
$(MIBDIR)/LIEBERT_GP_PDU.MIB
|
||||
@@ -129,7 +129,7 @@ mibs: mib-dir \
|
||||
$(MIBDIR)/EATON-OIDS.txt
|
||||
|
||||
mib-dir:
|
||||
- @mkdir -p -v $(MIBDIR)
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
this (which looks like a comment in net_snmp.go as it's wrapped in /* */)
|
||||
is used to initialise tclist which is a static array normally in
|
||||
net-snmp's object.
|
||||
|
||||
adjust to the size used in net-snmp 5.8; net-snmp zeroes the whole array
|
||||
during init, walking past the end of snmp_generator's provided array,
|
||||
and so segfaults. (XXX this code changed again in 5.9 and now does an
|
||||
initial smaller static alloc, followed by dynamic realloc; it does seem
|
||||
to still work)
|
||||
|
||||
Index: generator/net_snmp.go
|
||||
--- generator/net_snmp.go.orig
|
||||
+++ generator/net_snmp.go
|
||||
@@ -20,7 +20,7 @@ package main
|
||||
#include <net-snmp/mib_api.h>
|
||||
#include <unistd.h>
|
||||
// From parse.c
|
||||
-#define MAXTC 4096
|
||||
+#define MAXTC 16384
|
||||
struct tc {
|
||||
int type;
|
||||
int modid;
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue