Filter label_value function with query on value

This question has already been asked, but instead a work around has been given.

This generates output
label_values(libvirt_domain_state_code{instance=~"$instance"} , domain)

This is a valid prometheus query that generates output
libvirt_domain_state_code{instance=~"xxx"} == 1

However this does not work
label_values(libvirt_domain_state_code{instance=~"$instance"}==1 , domain)

https://localhost:3000/t/how-to-filter-result-of-label-value/12069

This topic was automatically closed after 365 days. New replies are no longer allowed.