From 637c0b86ee5abd03c0cf406d6a8cb97b9e7aa67d Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 4 Oct 2026 01:03:54 +0200 Subject: [PATCH] collectd: add VRF support Run collectd in a VRF, using the procd 'vrf' parameter: config globals 'globals' option vrf '' Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Nick Hainke --- utils/collectd/Makefile | 2 +- utils/collectd/files/collectd.init | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index 5618c8825c..2b14e5d621 100644 --- a/utils/collectd/Makefile +++ b/utils/collectd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=collectd PKG_VERSION:=5.12.0 -PKG_RELEASE:=57 +PKG_RELEASE:=58 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://collectd.org/files/ \ diff --git a/utils/collectd/files/collectd.init b/utils/collectd/files/collectd.init index 50c329bb11..1de251c22f 100644 --- a/utils/collectd/files/collectd.init +++ b/utils/collectd/files/collectd.init @@ -589,13 +589,17 @@ service_triggers() } start_service() { + local vrf + process_config + config_get vrf globals vrf procd_open_instance procd_set_param command /usr/sbin/collectd procd_append_param command -C "$COLLECTD_CONF" procd_append_param command -f # don't daemonize procd_set_param nice "$NICEPRIO" + [ -n "$vrf" ] && procd_set_param vrf "$vrf" procd_set_param stderr 1 procd_set_param respawn procd_close_instance