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
$disk_label
and have the following
label_values(node_disk_io_now,device)

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

{device=“sda”,instance=“server1”,job=“node”}

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!
-luis

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?