Rajesh Rajendran
Rajesh Rajendran

Reputation: 607

How to get total nginx requests of yesterday from prometheus?

This might be a stupid question, but I couldn't find any way to find all HTTP requests to my nginx proxy for last 1 day.

I tried sum_over_time(nginx_request_status_count{status_code='200'}[1d]) but where will I feed the time range? In this case, yesterday to today

But, as you can see above, I get only 200's summation. Even if I use =~ "2.." I'll get error as the output have multiple status codes.

Help appreciated.

Upvotes: 1

Views: 3742

Answers (1)

brian-brazil
brian-brazil

Reputation: 34112

You probably want sum(increase(nginx_request_status_count[1d])) which is roughly the total number of requests in the past day,

Upvotes: 2

Related Questions