You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed during my last tests that interfaces which has been moved in another netns that default one are no more seen by telegraf.
For example, if you have the following in your /etc/telegraf/telegraf.conf file:
[...]
[[inputs.net]]
interfaces = ["enp4s0f0", "enp4s0f1", "enp6s0f0", "enp6s0f1", "enp5s0f0"]
[...]
Then, put your interface enp5s0f0 in a new netns:
~# ip netns add telegraf_test
~# ip link set dev enp5s0f0 netns telegraf_test
~# ip netns exec telegraf_test ip link set dev enp5s0f0 up
Telegraf cannot get enp5s0f0 statistics anymore.
Is it the expected behavior ?
If so, it is a hard limitation for all the applications which use netns.
Is this feature planned ?
Thanks,
Gabriel
The text was updated successfully, but these errors were encountered:
I personally would recommend against telegraf implementing namespace support directly. In fact it will likely be impossible anyway (due to the way namespaces work, and having to spawn a new process to live inside the namespace).
Addressing this exact use case is why I opened #2087
However as an alternate solution, once #2094 is merged you can use it to solve the use case as well (by using unix domain sockets).
Hello,
I noticed during my last tests that interfaces which has been moved in another netns that default one are no more seen by telegraf.
For example, if you have the following in your /etc/telegraf/telegraf.conf file:
[...]
[[inputs.net]]
interfaces = ["enp4s0f0", "enp4s0f1", "enp6s0f0", "enp6s0f1", "enp5s0f0"]
[...]
Then, put your interface enp5s0f0 in a new netns:
~# ip netns add telegraf_test
~# ip link set dev enp5s0f0 netns telegraf_test
~# ip netns exec telegraf_test ip link set dev enp5s0f0 up
Telegraf cannot get enp5s0f0 statistics anymore.
Is it the expected behavior ?
If so, it is a hard limitation for all the applications which use netns.
Is this feature planned ?
Thanks,
Gabriel
The text was updated successfully, but these errors were encountered: