Monitoring Prometheus

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