I have a metric to monitor the health status of microservices called nodejs_microservice_health_status
.
I want to create a variable failedmicroservice
which extracts the value of the service
label of the metrics when nodejs_microservice_health_status
equals to 0.
The PromQL query nodejs_microservice_health_status == bool 0
returns all the items equals to 0, but when I tried to set the Query of the variable to label_values({nodejs_microservice_health_status == bool 0}, service)
,
I got the following error:
Do anyone knows how to do this?
Use the following values,
Query:
query_result(nodejs_microservice_health_status==0)
Regex:
/.*service=\"([^\"]+)\".*/