Query / Expression
promhttp_metric_handler_requests_total
promhttp_metric_handler_requests_total{code="200"}
count(promhttp_metric_handler_requests_total)
-- the per-second HTTP request rate returning status code 200
rate(promhttp_metric_handler_requests_total{code="200"}[1m])
-- Given an HTTP request counter, this query calculates the per-second average request rate over the last 5 minutes.
rate(http_request_total[5m])
histogram_quantile(0.95, sum(rate(prometheus_http_request_duration_seconds_bucket[5m])) by (le))
sort_desc(sum(sum_over_time(ALERTS{alertstate="firing"}[24h])) by (alertname))
Navigate to the server (http://localhost:9090/graph) and choose:
Defines the graph resolution using a duration format (15s, 1m, 3h, …). Small steps create high-resolution graphs but can be slow over larger time ranges. Using a longer step lowers the resolution and smooths the graph by producing fewer datapoints. If no step is given the resolution is calculated automatically.