See number of running machines

I am trying to get a promql query to work to see the number of machines running at any given time.
I used to use this query: count(sum(fly_instance_cpu{app=~"^$app$"}[$__interval]) by (region,host)) by (region) but since upgrading to apps V2 all of the fly_instance_ metrics are empty.

This feels like there should be a much simpler way of doing this that i am missing?

We plug this query into a graph count(fly_instance_up{app="$fly_app"}) by (region)

1 Like

Thanks, that query looks a lot nicer. I can now also see metrics to fly_instance_ being reported again so both queries work now.
Looks like some data in the metrics is missing in the window I was checking

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.