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

Using recording rules

Rules are defined separately from the main Prometheus configuration file, and are included by the latter through the rule_files top-level configuration key. They are evaluated periodically, and that interval can be defined globally with evaluation_interval inside global (defaults to one minute).

We can see this by looking at the configuration provided with the test environment:

vagrant@prometheus:~$ cat /etc/prometheus/prometheus.ymlglobal:...  evaluation_interval: 1m...rule_files:  - "recording_rules.yml"...

rule_files takes a list of paths, which can be relative to the main Prometheus configuration or absolute paths. Additionally, globs can be used to match filenames (not directories); for example, /etc/prometheus/rules/*.yml ...

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