Skip to content

Gatus for Mere Mortals

Every service you run fails the same way: quietly, while you are looking elsewhere. Gatus is the program that looks for you. You write one YAML file naming the endpoints that matter — a web page, an API, a port — and the conditions each must meet to count as healthy. Gatus visits them on your schedule, keeps the results, draws them on a dashboard, and sends an alert when one fails often enough in a row to be news. One program file, one config file, no account, no cloud: your services' health, watched from a machine you own.

This guide explains how Gatus decides what "up" means, how to install it and watch your first endpoint, and how its alerts, dashboard, badges and storage fit together. It is built around a lab that ran the real thing: Gatus v5.38.0, the official release, on a small Linux machine, watching three targets built for the purpose — a tiny web server that answers correctly, a health page that reports its own status, and a port with deliberately nothing on it, so failure could be observed as carefully as success.

Against those targets the lab did the jobs this guide teaches: three kinds of conditions (status, body, response time) passing and failing with their working shown; a healthy page made to count as down by one honest condition, to prove health means what the rules say; an alert threshold crossed, its webhook caught by a listening server the lab ran for the purpose, and the resolved message caught when the dead service was rescued; badges fetched for up and down endpoints alike; and storage put in a SQLite file, the program stopped and started, and the history found intact on the other side.

What the lab could not do, it did not fake. Its sandbox forbids raw sockets and blocks UDP, so ICMP ping checks failed for environmental reasons the lab proved with the machine's own ping, and DNS checks could not run; both are taught from the project's documentation and labelled as such. The container route — the project's primary install — is likewise documented rather than demonstrated, because the lab runs no containers; the binary the lab built from the official release source is the same program. criteria.md keeps the full ledger of what was run and what was only read.

What this guide covers

  • What Gatus is — the mental model: a list of endpoints, a rule for each, a watcher that visits, records and reports
  • The moving parts — the config file, the watchdog, the evaluator, the storage, and the web server and alerting engine — and which part holds what
  • Installing Gatus — the container image, the single binary built from the release source, and the port worth knowing about before it bites you
  • Your first endpoint — one real service watched every ten seconds, its verdicts read in the log, on the dashboard, and as API data
  • Conditions — what "up" means — placeholders, patterns, JSON paths into the body, and the day a 200 reply counted as down
  • Alerting — when down needs a human — thresholds that count before they shout, the forty-odd providers, and a real alert payload, caught
  • The dashboard and badges — reading the board, asking the API, and the little SVG verdicts other pages can wear
  • Storage and history — memory versus SQLite versus Postgres, the 100-result window, and history that survives a restart, proven
  • Recipes — a home status page in one file, a systemd unit, badges in a README, one alert shape for every endpoint, a split config, and a certificate-expiry watch
  • The neighbours — Beszel inside the machine, Prometheus and Grafana the metrics platform, Uptime Kuma the cousin, and the heartbeat specialists
  • Limits — the watcher that dies with the watched, health that is only ever your conditions, checks the machine may refuse, and history that is a window, not an archive
  • Troubleshooting — the empty dashboard, the occupied port, the alert that never arrived, the history that vanished, and the edit that stopped the watcher
  • Glossary — the terms, collected in one place

What it doesn't cover

Running Gatus at fleet scale — hundreds of endpoints across many watchers with shared configuration is a different problem from the one-file watcher this guide teaches, and the project is honest that suites (its chained, multi-step checks) are still alpha. Monitoring inside your services — metrics, traces, log pipelines — is the neighbours' territory, and chapter 10 points at the guides that cover it. And this guide does not teach the services being watched; its lab targets are deliberately tiny, so the watcher is the only thing under the lens.

How to use this guide

Read chapter 1 for the model, and chapter 2 before installing anything — knowing which part holds what turns later confusion into a named problem. Chapters 3 and 4 get you a running watcher with one honest check to its name. Chapter 5 is the one to read slowly: conditions are the whole definition of health, and every later chapter spends what it defines. Chapter 6 is not done when the config looks right — it is done when you have seen the message, and it shows you how to make that easy. The lab's transcripts live in gatus-lab/transcripts/; its target server is gatus-lab/serve.py, its webhook net is gatus-lab/capture.py, and the config behind every screenshot of behaviour is gatus-lab/config.yaml.


Part of the series

This guide is one of the For Mere Mortals guides: plain-language guides to the tools programmers and makers use.

Related guides:

License

The writing in this guide is licensed under CC BY 4.0. Code examples and lab scripts are licensed under the MIT License.