Answer the question
In order to leave comments, you need to log in
Metric in Prometheus - tracking the number of running instances?
There is a gauge metric instance_liveness {instanceId="{{random_id}}"}. I would like to display on the grafana, in fact, the number of "live" instances, the metric is pushed every 5 seconds.
At the moment I'm plotting this: count(count_over_time(sqsMessageHandler_service_liveness[10m]) > 0) by (env,instanceId).
It looks somehow crooked, given that the idea itself with constantly different instanceIds is row violence, but I didn’t come up with any other solution here. Maybe someone has already solved this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question