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

Recording rules tests

The promtool tool included in the Prometheus binary distribution allows us to define test cases to validate that the rules we write behave as expected. The test environment for this chapter also comes with a suite of pre-built tests for the rules we've explored so far. You can have a look at the configuration here:

vagrant@prometheus:~$ cat /etc/prometheus/tests.yml

This file has tests for all recording and alerting rules presented in this chapter. Although you don't need to define every test in a single file (it is, in fact, tidier to do a test file per rule group to keep things organized), this was done in this case for simplicity. For now, let's analyze only the recording rules, as they are simpler to grasp. The top-level ...

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