Skip to content

Queries in Prom

Course: Prometheus and Grafana - chapter 11

Here are some Prometheus queries you can run on localhost:9090 to analyze the metrics provided:

To get the total number of HTTP requests per route

http_requests_total

2. Total Number of HTTP Requests (cumulative)

Section titled “2. Total Number of HTTP Requests (cumulative)”
sum(http_requests_total)
http_request_duration_ms_sum

http_request_duration_ms_count

5. Average time it took to handle all requests

Section titled “5. Average time it took to handle all requests”
http_request_duration_ms_sum / http_request_duration_ms_count

http_request_duration_ms_bucket
http_request_duration_ms_bucket{method="GET", route="/metrics", code="200"}