Page MenuHomeVyOS Platform

telegraf do not start at boot when configured in VRF
Closed, InvalidPublicBUG


I recently noticed that telegraf monitoring service does not start at boot time for some reason. Looking at boot log i see 5 quick start attempts in a second with error:

ip[2474]: Failed to load BPF prog: 'Operation not permitted'
systemd[1]: telegraf.service: Main process exited, code=exited, status=255/EXCEPTION
vyos-lns-1 systemd[1]: telegraf.service: Failed with result 'exit-code'.

and after that the service remains in failed state. Checking other services like ntp and snmpd i see the same error at first few attempts to start them. I can't tell what can be the reason, but i see that systemd configuration


fixes that problem for ntp and snmpd. So i'd suggest adding the same Restart/RestartSec to the file
Sample boot log attached.


Difficulty level
Easy (less than an hour)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

I can't reproduce it

[email protected]:~$ show conf com | match "vrf|tele"
set interfaces ethernet eth1 vrf 'mgmt'
set service monitoring telegraf influxdb authentication organization '[email protected]'
set service monitoring telegraf influxdb authentication token 'GuRJc12tIzfjnYdKRAIYbxdWd2aTpOT9PVYNddzDnFV4HkAcD7u7-kndTFXjGuXzJN6TTxmrvPODB4mnFcseDV=='
set service monitoring telegraf influxdb port '8086'
set service monitoring telegraf influxdb url 'https://foo.local'
set service monitoring telegraf prometheus-client
set service monitoring telegraf vrf 'mgmt'
set vrf name mgmt table '1010'
[email protected]:~$

After reboot, the service telegraf works correctly

[email protected]:~$ sudo systemctl status telegraf
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
     Loaded: loaded (/lib/systemd/system/telegraf.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/telegraf.service.d
     Active: active (running) since Thu 2022-10-13 15:24:23 EEST; 1min 19s ago
   Main PID: 1868 (telegraf)
      Tasks: 10 (limit: 9404)
     Memory: 54.4M
        CPU: 2.650s
     CGroup: /system.slice/telegraf.service
                 └─1868 /usr/bin/telegraf --config /run/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --pidfile /run/telegraf/
c-po assigned this task to Viacheslav.