label matcher
A condition on a label inside a PromQL selector: = for an exact value, != to exclude, =~ and !~ for regular expressions.
In more detail
Exact matching asks for one known value, a regular expression can match several, and a negative matcher excludes a class such as health checks. Every matcher changes which series enter the result.
Examples
{route!="/healthz"}{status=~"5.."}Related terms
- series selector — The part of a PromQL query that names a metric and optional label matchers, choosing which time series take part.
- metric label — A name and value attached to a metric, such as status="200", that splits one metric into separate series you can compare.
- regular expression — A pattern language for matching text, where characters such as ., *, ^ and $ have special meanings.
Taught in
- PromQL Basics And Selectors — Full-Stack Observability: Metrics, Tracing & Logging
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- The Server That Would Not Die: Selecting Data — Prometheus Certified Associate (PCA) Exam Prep
- Forty One Buzzes: Routing Alerts With Alertmanager — Prometheus Certified Associate (PCA) Exam Prep
- Twelve Green Panels: Dashboarding Basics — Prometheus Certified Associate (PCA) Exam Prep
- Alerting Sprint: Eleven Calls In Three Rounds — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep