collectd: add VRF support

Run collectd in a VRF, using the procd 'vrf' parameter:

  config globals 'globals'
	option vrf '<dev>'

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke authored and Hannu Nyman committed 2026-10-09 17:21:01 +03:00
1 parent 2a80a9e77a
commit 637c0b86ee
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -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/ \
+4
View File
@@ -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