diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-22 08:12:21 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-01-22 08:12:21 +0100 |
commit | 64473fa6f320375fb3d3de4de9e729f456ee5ae2 (patch) | |
tree | 515fce4e97b9103f320bc8d55a9a7b2fd0f13f89 /data/templates/sflow/override.conf.j2 | |
parent | c9bceff2191986af504b114d2d8cfc3547f72ed1 (diff) | |
download | vyos-1x-64473fa6f320375fb3d3de4de9e729f456ee5ae2.tar.gz vyos-1x-64473fa6f320375fb3d3de4de9e729f456ee5ae2.zip |
sflow: T5968: add VRF support
Add support to run hsflowd in a dedicated (e.g. management) VRF.
Command will be "set system sflow vrf <name>" like with any other service
Diffstat (limited to 'data/templates/sflow/override.conf.j2')
-rw-r--r-- | data/templates/sflow/override.conf.j2 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/data/templates/sflow/override.conf.j2 b/data/templates/sflow/override.conf.j2 index f2a982528..73588fdb2 100644 --- a/data/templates/sflow/override.conf.j2 +++ b/data/templates/sflow/override.conf.j2 @@ -1,3 +1,4 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %} [Unit] After= After=vyos-router.service @@ -7,7 +8,7 @@ ConditionPathExists=/run/sflow/hsflowd.conf [Service] EnvironmentFile= ExecStart= -ExecStart=/usr/sbin/hsflowd -m %m -d -f /run/sflow/hsflowd.conf +ExecStart={{ vrf_command }}/usr/sbin/hsflowd -m %m -d -f /run/sflow/hsflowd.conf WorkingDirectory= WorkingDirectory=/run/sflow PIDFile= |