Using the label_replace function in PromQL

do something like the following:

label_replace(up, "short_hostname", "$1", "instance", "(.+):(\\d+)")

Then put {{short_hostname}} in the legend field in Grafana


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *