Label_values Only show device

Prometheus + Grafana setup here, new to the forum!

Gotta say, LOVE this setup much more then nagios.

So heres my q. using templating i setup this variable
and have the following

But i have this under disk i/o and the labels are of devices that are not used. loop,loop1 etc instead of sda etc. so i have the following under me graph query

irate(node_disk_io_time_ms{job=“node”, instance=~"$node", device!~“loop”, device!~“ram”, device!~“dm-”}[5m]) / 1000

my labels come out like such if i leave legend format alone


if i add $disk_label in Legend format then i get the loop1, dm-0 etc in the label instead of the corresponding device. i tried to do this

label_values(node_disk_io_now{device!~“loop”, device!~“ram”, device!~“dm-”})

that for sure did not work =|

thanks in advance!

just use {{device}} if you want the device label value in the legend

1 Like

Thank you! worked like a charm

Is there a link where it shows all the default variables and explains what it will be used for?