sysutils/node_exporter: fix meminfo collector

meminfo collector failed with:

node_exporter[29302]: ts=2023-02-04T09:06:27.328Z caller=collector.go:169
level=error msg="collector failed" name=meminfo duration_seconds=0.000127617
err="couldn't get memory: cannot allocate memory"

This patch contains a fix for the meminfo collector, it has also been submitted
upstream.

PR:		269154
Reported by:	David O'Rourke <dor.bsd@xm0.uk>
This commit is contained in:
David O'Rourke 2023-02-04 20:11:14 +01:00 committed by Fernando Apesteguía
parent 3750846242
commit ede3d9baa5
2 changed files with 11 additions and 0 deletions

View file

@ -1,6 +1,7 @@
PORTNAME= node_exporter
PORTVERSION= 1.5.0
DISTVERSIONPREFIX=v
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= dor.bsd@xm0.uk

View file

@ -0,0 +1,10 @@
--- collector/memory_bsd.go.orig 2023-02-03 16:38:43 UTC
+++ collector/memory_bsd.go
@@ -87,6 +87,7 @@ func NewMemoryCollector(logger log.Logger) (Collector,
description: "Locked in memory by user, mlock, etc",
mib: "vm.stats.vm.v_user_wire_count",
conversion: fromPage,
+ dataType: bsdSysctlTypeCLong,
},
{
name: "cache_bytes",