Selectors
Prometheus is designed to handle hundreds of thousands of time series. Each metric name can have several different time series, depending on the combination of labels; querying the right data can look difficult, or even downright perplexing, when similarly-named metrics from different jobs are mixed together. In Prometheus, a selector refers to a set of label matchers. The metric name is also included in this definition as, technically, its internal representation is also a label, albeit a special one: __name__. Each label name/value pair in a selector is called a label matcher, and multiple matchers can be used to further filter down the time series matched by the selector. Label matchers are enclosed in curly brackets. If no matcher ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access