Book Image

Observability with Grafana

By : Rob Chapman, Peter Holmes
Book Image

Observability with Grafana

By: Rob Chapman, Peter Holmes

Overview of this book

To overcome application monitoring and observability challenges, Grafana Labs offers a modern, highly scalable, cost-effective Loki, Grafana, Tempo, and Mimir (LGTM) stack along with Prometheus for the collection, visualization, and storage of telemetry data. Beginning with an overview of observability concepts, this book teaches you how to instrument code and monitor systems in practice using standard protocols and Grafana libraries. As you progress, you’ll create a free Grafana cloud instance and deploy a demo application to a Kubernetes cluster to delve into the implementation of the LGTM stack. You’ll learn how to connect Grafana Cloud to AWS, GCP, and Azure to collect infrastructure data, build interactive dashboards, make use of service level indicators and objectives to produce great alerts, and leverage the AI & ML capabilities to keep your systems healthy. You’ll also explore real user monitoring with Faro and performance monitoring with Pyroscope and k6. Advanced concepts like architecting a Grafana installation, using automation and infrastructure as code tools for DevOps processes, troubleshooting strategies, and best practices to avoid common pitfalls will also be covered. After reading this book, you’ll be able to use the Grafana stack to deliver amazing operational results for the systems your organization uses.
Table of Contents (22 chapters)
1
Part 1: Get Started with Grafana and Observability
5
Part 2: Implement Telemetry in Grafana
10
Part 3: Grafana in Practice
15
Part 4: Advanced Applications and Best Practices of Grafana

Installing the prerequisite tools

Grafana is much more exciting with data! To build a realistic view of how Grafana works and can help your organization, we have chosen to install the OpenTelemetry demo application. This is a demonstration web store that sells telescopes and other observational equipment. We’ll take you through the installation process to get this running locally on your machine.

But first, there are a few prerequisites that your local environment has, and they depend on the operating system you use.

In this section, we will explain how to install the following:

  • Tools based on your operating system:
    • Windows Subsystem for Linux version 2 (WSL2)
    • macOS Homebrew
  • Docker or Podman
  • A single-node Kubernetes cluster
  • Helm

Installing WSL2

WSL is a way of running a Linux filesystem and tools directly on Windows. This is used to give a standard set of commands and tools across operating systems. It is possible to run these systems outside...