Skip to Main Content
Hands-On Infrastructure Monitoring with Prometheus
book

Hands-On Infrastructure Monitoring with Prometheus

by Joel Bastos, Pedro Araújo
May 2019
Intermediate to advanced content levelIntermediate to advanced
442 pages
11h 36m
English
Packt Publishing
Content preview from Hands-On Infrastructure Monitoring with Prometheus

Label matchers

Matchers are employed to restrict a query search to a specific set of label values. We'll be using the node_cpu_seconds_total metric to exemplify the four available label matcher operators: =, !=, =~, and !~. Without any matching specification, this metric alone returns an instant vector with all the available time series containing the metric name, as well as all combinations of the CPU core numbers (cpu=”0”, cpu=”1”) and CPU modes (mode="idle", mode="iowait", mode="irq", mode="nice", mode="softirq", mode="steal", mode="user", mode="system"), which makes a grand total of 16 time series, as shown in the following screenshot:

Figure 7.2: node_cpu_seconds_total query resulting in 16 time series being returned

Now, let's use ...

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.
Start your free trial

You might also like

How Fastly used Prometheus to improve infrastructure and application monitoring

How Fastly used Prometheus to improve infrastructure and application monitoring

Marcus Barczak

Publisher Resources

ISBN: 9781789612349Supplemental Content