Chapter 15. Observability and Monitoring

Nothing is ever completely right aboard a ship.

William Langewiesche, The Outlaw Sea

In this chapter, we’ll consider the question of observability and monitoring for cloud native applications. What is observability? How does it relate to monitoring? How do you do monitoring, logging, metrics, and tracing in Kubernetes?

What Is Observability?

Observability may not be a familiar term to you, though it’s becoming increasingly popular as a way to express the larger world beyond traditional monitoring. Let’s tackle monitoring first before we see how observability extends it.

What Is Monitoring?

Is your website working right now? Go check; we’ll wait. The most basic way to know whether all your applications and services are working as they should is to look at them yourself. But when we talk about monitoring in a DevOps context, we mostly mean automated monitoring.

Automated monitoring is checking the availability or behavior of a website or service, in some programmatic way, usually on a regular schedule, and usually with some automated way of alerting human engineers if there’s a problem. But what defines a problem?

Closed-Box Monitoring

Let’s take the simple case of a static website. If it’s not working at all, it just won’t respond, or you’ll see an error message in the browser. So the simplest possible monitoring check for this site is to fetch the home page and check the HTTP status code (200 indicates a successful request). You could ...

Get Cloud Native DevOps with Kubernetes, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.