Get the ifalias of network interfaces

  • What Grafana version and what operating system are you using?


  • What are you trying to achieve?

Display ifalias label in network traffic graph which is repeated by interface name

  • How are you trying to achieve it?

I created a new variable called netvmdevice

The query is (node-exporter):

label_values(node_network_device_id{instance="$node", job="$job"}, device)

I created a new variable called ifalias

The query is (node-exporter):

label_values(node_network_info{device="$netvmdevice"}, ifalias)
  • What happened?

When I choose one value for netvmdevice, it is working fine. The ifalias contains the correct value.

But if I choose All, it is not working. The ifalias is None.

  • What did you expect to happen?

On each graph (repeated by netvmdevice), the good ifalias in the title.

Hi @smutel

Hoping you’re unblocked on this by now. If not, a screenshot of your variable setup page might help here. Thanks!

When we select All as Network device, it’s not possible to get the ifAlias.
If I select a specific port, IfAlias is correctly set.
Grafana - Variable - 02


Because netvmdevices is using All, you just need to modify the query in the ifalias like below:

If the netvmdevice is exact, you don’t need “=~”, if using all, it means like asterisk…

Fadjar Tandabawana

1 Like


No it does not work …

Any other suggestion ?

This topic was automatically closed after 365 days. New replies are no longer allowed.