Grafana Fly.io experts! How can I create a requests per second chart?

Hi! I humbly come here to request assistance from the grafana query builder experts.

I’d like to create a panel to display requests per second from my Fly.io app (so that i can start improving our autoscaling based off of requests traffic). There’s a blog post that does this but doesn’t show the query that was built to do it…

The post is referenced here: Hooking Up Fly Metrics · The Fly Blog I don’t really care about the grouping by response code but instead by instance

I’ve got a query started but my y axis is only showing count instead of /sec. Would love some help here! Thank you so much

My current attempt

sum(rate(fly_app_http_responses_count{app=~"$app"}[1m])) by (instance, region)

What i see


Edit: Is it as simple as creating a custom “unit” for req/s? If so, does the rest of my query seem to be correct for my requested use case?

1 Like

From General to Questions / Help

Try sum by (status) (rate(fly_app_http_responses_count{app=~"$app"}[1m])).

(you’re looking at the rate of http requests per instance/region, you want status)

Thanks for the response @zifnab ! So just to clarify, I am not too concerned on status, but instead requests/sec. Does this mean I was actually on the right track with the original query?

Ha, sorry I misread your initial post :slight_smile:

The units in this case are just a display option in grafana (the query you have gives you the current rate of that metric, then sums those rates into buckets for each unique instance/region pair).

As an example: this graph:

I configured a legend with Max/Last values added:

And changed the units to “requests/sec”:

No worries at all @zifnab the max/last in the legend is awesome as well, thank you!!

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