Monitoring & Alerting

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-09 against Grafana 13.3.x and Kibana 9.5.x (Elasticsearch 9.5.6).

Monitoring and alerting answer two practical questions about a running service: is it healthy right now? and who must act when it is not? This section teaches the whole path from a piece of telemetry to a notified human, using the two tools that most teams meet first: Grafana, a visualization and alerting layer that queries many data sources where they live, and Kibana, the user interface of the Elastic Stack, which works over data stored in Elasticsearch. Every concept is taught twice, once with each tool, on the same running example, so that you can use one tool well, choose between them, or run both.

The section also has two series of hands-on guides, 19 for Grafana and 19 for Kibana, that run in the lab one screen at a time: from the first sign-in to dashboards, alert rules, notifications and permissions. Start with the Grafana Guide: First Steps in Grafana or the Kibana Guide: First Steps in Kibana; the guide lists are on the Grafana and Kibana pages.

Monitoring and observability

Monitoring is watching known signals against known expectations: a dashboard of request rate, errors and latency, and an alert when the error share crosses a threshold. Observability is the property of a system that lets you ask new questions of it after the fact, because it emits enough detailed telemetry (metrics, logs, traces and, increasingly, profiles) to explain behaviour nobody predicted. The two are not rivals. Monitoring is the part you automate (dashboards that load by themselves and alerts that page someone), and observability is the data quality that makes monitoring possible and investigation fast. Observability Fundamentals defines the signals, series identity and cardinality, and shows how a metric, a trace and a log line are correlated.

The consequences for design are concrete. Choose signals deliberately, because each has a cost. Keep label values bounded, because every new combination is a new series. Alert on symptoms users feel, and keep causes on dashboards. Treat dashboards and alert rules as code, because configuration that lives only in a web UI cannot be reviewed, tested or restored. The shared pages of this section cover each of these ideas before the tool-specific subsections apply them.

How Grafana and Kibana fit

The two tools sit at different places in the pipeline, and understanding that placement explains most of their differences.

  • Grafana is a visualization, exploration and alerting layer. It stores almost no telemetry: metrics stay in Prometheus or Mimir, logs in Loki or Elasticsearch, traces in Tempo, business data in a SQL database. Grafana holds its own configuration (dashboards, folders, users, alert rules) and sends each query to the data source that owns the data. See Grafana: Architecture & Ecosystem.

  • Kibana is the user interface of the Elastic Stack. Elasticsearch stores and indexes the data (logs, metrics and traces in data streams), the EDOT Collector or Elastic Agent collects it, and Kibana queries, visualizes and alerts on it, adding Observability solutions (APM, Synthetics, SLOs, infrastructure views) on top. See Kibana: Architecture & the Elastic Stack.

Both tools evolve towards each other: Grafana can read Elasticsearch, and Kibana 9.5 added native PromQL over time series data streams. Grafana vs Kibana compares them feature by feature, including the alerting models, and tells you when to choose one, the other or both.

Telemetry flowing through collect, store, query, visualize, alert and notify stages, with the Grafana stack and the Elastic stack side by side

Reading the figure from left to right: the same Bookshelf telemetry is collected, stored, queried, visualized and alerted on, and the last stage is always a notification to a person or a ticket system. The pipeline pages Telemetry Collection Pipelines and Storage, Retention & Cost detail the first three stages.

The running example and the lab

Every page uses Bookshelf, the Spring Boot 4.1 book-catalogue service already used by Spring Boot metrics and observability and Spring Boot logging. It exposes Micrometer metrics, OpenTelemetry traces and JSON logs, and uses PostgreSQL. The Hands-on Lab is a Docker Compose project with two profiles:

  • grafana: Bookshelf, a load generator, a webhook receiver, Grafana Alloy, Prometheus, Loki, Tempo and Grafana 13.3. It needs about 1 GB of memory.

  • kibana: Bookshelf, the same load generator and webhook receiver, the EDOT Collector, Elasticsearch 9.5.6 and Kibana 9.5.6. It needs about 4 GB of memory.

Bookshelf runs in the lab as a small stand-in service that emits the same signals, so that the lab starts quickly and its failure and slow modes can be switched on demand by the load generator. The two Bookshelf End to End pages (Grafana and Kibana) build the same "Bookshelf service health" dashboard and the same five alerts in each tool and record how long each notification took.

How to verify the lab: start one profile, open Grafana at http://localhost:3000 or Kibana at http://localhost:5601, and check that the webhook receiver logs a notification after you switch the load generator to its failing-request mode. The lab page lists the check for every component.

What’s covered

Part Pages

Shared concepts

Observability Fundamentals, Metric Types & Aggregation, Telemetry Collection Pipelines, Storage, Retention & Cost, RED, USE & the Golden Signals, SLIs, SLOs & Error Budgets, Dashboard Design Principles, Choosing a Visualization, Alerting Fundamentals, Designing Actionable Alerts, Notifications & Incident Response, Observability as Code

Comparison and practice

Grafana vs Kibana, Hands-on Lab, Glossary

Grafana

Grafana index (architecture, installation, access control, data sources, queries, transformations, dashboards, variables, annotations, library panels, sharing, visualizations, field configuration, alerting architecture, rules, evaluation states, labels, recording rules, notification policies, contact points, templates, silences and mute timings, state history, high availability, provisioning, dashboards as code, SLOs and IRM, best practices), Bookshelf End to End, Cheat Sheet

Kibana

Kibana index (architecture, installation, spaces and roles, ingestion, data streams, Discover, query languages, Lens, ES|QL panels, other panels, dashboards, controls, sharing, dashboards as code, infrastructure, APM and Synthetics, SLOs, machine learning, alerting, rules, actions, connectors, lifecycle and maintenance windows, cases, alerting setup, APIs and Terraform, Universal Alerting and Watcher, Stack Monitoring, best practices), Bookshelf End to End, Cheat Sheet

The repository already holds deeper tool-specific pages that this section links to rather than repeats: the Prometheus section (PromQL, Alertmanager, recording and alerting rules), the Elasticsearch section, and the Backend guides for Spring Boot, Quarkus, Kubernetes, Docker and JMeter.

How the pages are written

Each page follows the same pattern: what the concept is, why it exists, how to do it in the user interface and as code, what can go wrong, and how to verify it in the lab. Every section and example ends with a Source: or Reference: line that links the exact official page. Where a topic also appears in one of the books in the bibliography, a short In the books paragraph says what still holds and what has changed since the book’s version. The official documentation is the primary source for every fact, setting and code sample; the books add method and context.

Reading path

Pick the path that matches your situation. Every page links to its neighbours, so you can also follow your own route.

New to monitoring

Read the shared pages in order: Observability Fundamentals, Metric Types & Aggregation, RED, USE & the Golden Signals, SLIs, SLOs & Error Budgets, Dashboard Design Principles and Alerting Fundamentals. Then run the Hands-on Lab and the end-to-end page of the tool you will use.

I use Grafana

Start at the Grafana index, then Data Sources, Building Dashboards, Variables and Alerting Architecture. Keep the Grafana Cheat Sheet open while you work.

I use Kibana

Start at the Kibana index, then Data Views & Discover, Lens, Building Dashboards and Alerting Overview. Keep the Kibana Cheat Sheet open while you work.

I need to set up alerting

Read Alerting Fundamentals, Designing Actionable Alerts and Notifications & Incident Response. Then follow the Grafana path (Alert Rules, Notification Policies, Contact Points) or the Kibana path (Rules, Actions, Connectors).

I manage dashboards and alerts as code

Read Observability as Code, then Provisioning Alerting Resources and Grafana Dashboards as Code, or Alerting APIs & Terraform and Kibana Dashboards as Code.

I am choosing between the tools

Read Grafana vs Kibana and look up unfamiliar terms in the Glossary.

Bibliography

This is the list of every source used to write the section. Each entry links the source’s official website, and each book links its publisher page. Entries are grouped by vendor or topic and carry no prices.

Official starting points

Books

  • Eric Salituro, Learn Grafana 10.x, 2nd ed., Packt, 2023, ISBN 978-1-80323-108-2: publisher page

  • Rob Chapman and Peter Holmes, Observability with Grafana, Packt, 2023, ISBN 978-1-80324-800-4: publisher page

  • Rodrigo Juan Hernández, Building IoT Visualizations using Grafana, Packt, 2022, ISBN 978-1-80323-612-4: publisher page

  • Ronald McCollam, Getting Started with Grafana: Real-Time Dashboards for IT and Business Operations, Apress, 2022, ISBN 978-1-4842-8308-0: publisher page

  • Michael Hausenblas, Cloud Observability in Action, Manning, 2023, ISBN 978-1-63343-959-7: publisher page

  • Krishna Shah, Kibana 8.x: A Quick Start Guide to Data Analysis, Packt, 2024, ISBN 978-1-80323-216-4: publisher page

  • Alberto Paro, Elasticsearch 7.0 Cookbook, 4th ed., Packt, 2019, ISBN 978-1-78995-650-4: publisher page

  • Saurabh Chhajed, Learning ELK Stack, Packt, 2015, ISBN 978-1-78588-715-4: publisher page

  • Madhusudhan Konda, Elasticsearch in Action, 2nd ed., Manning, 2023, ISBN 978-1-61729-985-8: publisher page

  • Nadine Melachi, Practice guide: Elastic from A to Z by examples. Beats, Logstash, Elasticsearch, Kibana, self-published (Kindle), 2021, no ISBN. The book is self-published and has no publisher website; its Goodreads entry identifies it.

Pages cited in the section

The pages below are the individual official pages that the section links from its Source: and Reference: lines, grouped by vendor and topic.

Elastic Observability (solutions)

Elastic documentation: Explore and analyze (Discover, dashboards, visualizations, ES|QL, machine learning)

Elastic documentation: Get started

Elastic documentation: Troubleshooting

Grafana documentation: Alerting

Grafana documentation: Dashboards, panels, Explore and Drilldown

Grafana documentation: Upgrade guides

In the books

Ten books were read for this section. For Grafana: Salituro (Grafana 10), Chapman and Holmes (Grafana 10.2), Hernandez (Grafana 8) and McCollam (Grafana 8.2/8.3). For observability in general: Hausenblas. For the Elastic Stack: Shah (Kibana 8), Paro (Elasticsearch 7), Chhajed (the ELK stack of 2015), Konda (Elasticsearch 8) and Melachi (a self-published guide to Beats, Logstash, Elasticsearch and Kibana). They are strongest on method: how to design dashboards for an audience, how to reason about SLOs and error budgets, how to buffer telemetry, how aggregations work. They are weakest on product detail, because every one predates the versions described here. Ignore any instruction that mentions Grafana API keys, legacy alerting, Angular panels, Grafana Agent, Promtail, Kibana TSVB or Timelion, Beats-only ingestion, Curator or Elasticsearch types, and use the official pages linked from each topic instead. The publisher pages are listed in the bibliography.

References

The step-by-step guides of the Grafana and Kibana subsections were checked against the official tutorial and documentation pages below. Each guide lists the pages it used under its own == Sources; this is the union, with no text copied from them.

Grafana

Kibana and Elastic