Hello,

I need to lowercase the hostname of my metrics. 

I would like to use the function label_replace as below. The idea here is 
to create a new field called "host" that forces the lowercase of the 
"hostname "field. Is it possible to use the regex (here "[[LOWER]]") to do 
this ? 

sum without (hostname) (label_replace(up{instance="x.x.x.x:9100"}  * on 
(instance) group_left(hostname) sophosav_linux_started, "host", "${1}", 
"hostname", "[[LOWER]]"))

Thanks for your answer

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/033ca76c-1250-4e22-93e8-dcf15a1cbea0n%40googlegroups.com.

Reply via email to