a book by Joel Bastos & Pedro Araújo

Hands-On Infrastructure Monitoring with Prometheus

Implement and scale queries, dashboards, and alerting across machines and containers. Technical review by Brian Brazil. Published by Packt.

Cover of Hands-On Infrastructure Monitoring with Prometheus
The feeling that a lot of that knowledge comes from practical on-the-trenches experience with the technologies described only makes the reading experience more interesting.
Miguel Fonseca · Amazon review
…the authors did a very good job of focusing on the most important aspects of the Prometheus stack without leaving behind anything worth mentioning.
William Davis · Amazon review
This book is more than an overview of Prometheus and its components, it’s a full course on modern monitoring using this technology as a baseline.
Jack · Amazon review

the book

From monitoring fundamentals to a global, highly available Prometheus stack

Prometheus is an open source monitoring system: a modern time series database, a robust query language, flexible visualization and reliable alerting for traditional and cloud-native infrastructure.

This book explores its architecture, its data model and how metric aggregation works, with multiple test environments to try each configuration scenario, from exporters and integrations onwards. You’ll go deep on PromQL, apply it to alerting and recording rules and learn how to test them, then route alerts with Alertmanager and build Grafana dashboards. It covers several service discovery mechanisms, including writing your own, and finishes with federation, cross-shard aggregation and long-term storage with Thanos.

By the end, you’ll be able to run Prometheus as a full monitoring system on-premises, in the cloud, standalone or on Kubernetes.

what you will learn

Six things you’ll be able to do

  1. 01

    Monitoring fundamentals

    Grasp monitoring fundamentals and implement them using Prometheus.

  2. 02

    Exporters and integrations

    Discover how to extract metrics from common infrastructure services.

  3. 03

    Prometheus query language

    Find out how to take full advantage of PromQL.

  4. 04

    Visualizations and alerting

    Truly understand Alertmanager and how to create reliable alerts. Learn, build and share Grafana dashboards.

  5. 05

    Container-based monitoring

    Explore the power of the Kubernetes Prometheus Operator.

  6. 06

    Thanos and scaling Prometheus

    Design a highly available, scalable stack with federation and cross-shard aggregation, with global views and long-term retention through Thanos.

technologies

Covered in depth, plus the tools around them

get the book

Start monitoring like you mean it

Available on Amazon in Kindle and paperback editions, and to read on O’Reilly.

the authors

Written by engineers who run it in production

Joel Bastos

Joel Bastos

VP of Engineering & Author

Joel helps companies scale through hypergrowth with talent density, automation, reliability and security. Over twenty years he has built the certificate authorities and HSMs behind Portugal’s citizen card, a fully automated private cloud for hundreds of apps at Paddy Power Betfair, self-service observability for 1,000+ engineers at Farfetch, and today a cloud platform shipping ~15,000 deploys a month at Teya.

Pedro Araújo

Pedro Araújo

Principal Infrastructure Engineer

Pedro Araújo is a site reliability and automation engineer and has defined and implemented several standards for monitoring at scale. His contributions have been fundamental in connecting development teams to infrastructure. He is highly knowledgeable about infrastructure, but his passion is in the automation and management of large-scale, highly-transactional systems. Pedro has contributed to several open source projects, such as Riemann, OpenTSDB, Sensu, Prometheus, and Thanos.

code

Every test environment from the book is on GitHub

Vagrant and Kubernetes setups to follow along, chapter by chapter.

View the repo →