From https://forum.vyos.io/t/suppress-unsupported-interfaces-from-being-reported-on-by-telegraf/13940
Issue:
Unsupported interfaces (pppoe, tunnel, wireguard) are picked up by Telegraf and appearing /var/log/messages with very frequent occurrence in log file.
Mar 4 21:36:45 <hostname> telegraf[131801]: 2024-03-05T02:36:45Z E! [inputs.ethtool] Error in plugin: "pim6reg" driver: operation not supported Mar 4 21:36:45 <hostname> telegraf[131801]: 2024-03-05T02:36:45Z E! [inputs.ethtool] Error in plugin: "tun0" stats: operation not supported Mar 4 21:36:45 <hostname> telegraf[131801]: 2024-03-05T02:36:45Z E! [inputs.ethtool] Error in plugin: "sit0" stats: operation not supported Mar 4 21:36:45 <hostname> telegraf[131801]: 2024-03-05T02:36:45Z E! [inputs.ethtool] Error in plugin: "wg01" stats: operation not supported Mar 4 21:36:45 <hostname> telegraf[131801]: 2024-03-05T02:36:45Z E! [inputs.ethtool] Error in plugin: "pppoe0" stats: operation not supported Mar 4 21:37:03 <hostname> telegraf[131801]: 2024-03-05T02:37:03Z E! [inputs.ethtool] Error in plugin: "pim6reg" driver: operation not supported Mar 4 21:37:03 <hostname> telegraf[131801]: 2024-03-05T02:37:03Z E! [inputs.ethtool] Error in plugin: "tun0" stats: operation not supported Mar 4 21:37:03 <hostname> telegraf[131801]: 2024-03-05T02:37:03Z E! [inputs.ethtool] Error in plugin: "wg01" stats: operation not supported Mar 4 21:37:03 <hostname> telegraf[131801]: 2024-03-05T02:37:03Z E! [inputs.ethtool] Error in plugin: "pppoe0" stats: operation not supported Mar 4 21:37:03 <hostname> telegraf[131801]: 2024-03-05T02:37:03Z E! [inputs.ethtool] Error in plugin: "sit0" stats: operation not supported
Cause:
Script “/etc/telegraf/custom_scripts/show_interfaces_input_filter.py” at bottom of /run/telegraf/telegraf.conf includes these problematic interfaces.
# Generated by /usr/libexec/vyos/conf_mode/service_monitoring_telegraf.py InfluxDB2 [[outputs.influxdb_v2]] urls = ["http://localhost:8086"] insecure_skip_verify = true token = "$INFLUX_TOKEN" organization = "vyos" bucket = "bucket_vyos" End InfluxDB2 ... ... [[inputs.ethtool]] interface_include = ['eth0', 'eth1', 'eth2'] ... ... [[inputs.exec]] commands = [ "/etc/telegraf/custom_scripts/show_firewall_input_filter.py", "/etc/telegraf/custom_scripts/show_interfaces_input_filter.py", "/etc/telegraf/custom_scripts/vyos_services_input_filter.py" ] ... user@<hostname>:~$ python3 /etc/telegraf/custom_scripts/show_interfaces_input_filter.py show_interfaces,interface=eth0 ip_addresses="xxx.xxx.xxx.xxx/24",state=0i,link=0i,description="WAN" 1709607132000000000 show_interfaces,interface=eth1 ip_addresses="xxx.xxx.xxx.xxx/24",state=0i,link=0i,description="LAN" 1709607132000000000 show_interfaces,interface=eth2 ip_addresses="-",state=0i,link=1i,description="empty" 1709607132000000000 show_interfaces,interface=lo ip_addresses="127.0.0.1/8 ::1/128",state=0i,link=0i,description="empty" 1709607132000000000 show_interfaces,interface=pppoe0 ip_addresses="xxx.xxx.xxx.xxx/32",state=0i,link=0i,description="bell-fibe" 1709607132000000000 show_interfaces,interface=tun0 ip_addresses="2XXX:XXX:XX:XXX::X/64",state=2i,link=1i,description="HE.NET IPv6 Tunnel" 1709607132000000000 show_interfaces,interface=wg01 ip_addresses="XX.XX.XX.XX/24",state=0i,link=0i,description="remote admin" 1709607132000000000 user@<hostname>:~$
Possible Fix:
Either:
Quick and dirty: delete line “/etc/telegraf/custom_scripts/show_interfaces_input_filter.py” from /run/telegraf/telegraf.conf since eth0/1/2 interfaces already mentioned in config file making python script not needed (I’m not sure what the purpose of including that python script was for but if removing it cause needed interfaces from being suppressed then propose solution 2)
-or-
More elegant: modify show_interfaces_input_filter.py to exclude interfaces that aren’t supported by Telegraf (I suspect anything that isn’t an ethX will probably give error)