Basic PromQL Querying

All Topics

Selecting Series

Selecting Series

The simplest PromQL query is just a metric name. It returns all time series that have that metric name.

http_requests_total

Table view shows the latest value for each series. Graph view shows how values change over time.

Narrow results with label matchers. Add conditions inside {} to filter by label values:

http_requests_total{status="200"}

Multiple matchers are combined with AND logic — all must match:

http_requests_total{method="GET", status="200"}

Metric names are just labels internally. The metric name is stored as a special label called __name__. So these two queries are equivalent:

http_requests_total
{__name__="http_requests_total"}

This can be useful to select multiple metric names at once:

{__name__=~"http_requests.*"}

Always include the job label in production queries. In larger setups, different services may expose the same metric name with different semantics. Including job avoids collisions:

http_requests_total{job="demo"}
Back 1 / 14 Next