0

I have machines with one interface eth0 with multiple different IP addresses attached to it (255) to be exact, interfaces look like this eth0:1, eth0:2 ...eth0:254.

I want to monitor the traffic for each IP whit Prometheus + Grafana (or at least visualize it in Grafana).

So far I managed to get the overall traffic of the eth0 interface. I tried with SNMP, but still I can get overall traffic only. I also looked up how iotop calculates traffic of each IP and it looks like it opens each packet and check the ip address inside of it.

Using Ubuntu 18.04.

  • Depending on what you use those IP addresses for, you could also replace them with applications running in a network namespaces, connect up the namespaces via a veth pair, and measure traffic on the veth pair. Then you'll be able to distinguish by interfaces. – dirkt Dec 6 '18 at 15:15
1

eth0:1, eth0:2 etc are not virtual interfaces, the colon and number part is just a label associated with one of the multiple addresses assigned to the interface. This label is required by old tools, but it is not needed by modern tools like ip. You will have to use a monitoring tool that can filter traffic by IP address if you want to separate them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy