Customise legend

Hey everybody. Im using Grafana with Prometheus Datasource.
I am running a query against a specific interface name but when the query returns to the graph it only returns “Interface 0” or “interface 1” instead of the actual interface name such as “GigabitEthernet1”…

When looking through legend values i do not get the option that would change this data format either. Any suggestions? Im still new to Graphana and prometheus btw.

If you have the interface as a Prometheus label, you can access it dynamically in Grafana’s “legend” text box (below the query) using {{ interface }}, otherwise you can just type the legend display name manually.

Is that tricky to do? I have a router that has for example 5 interfaces…I just want to be able to see the interface names…