Recipes
Each recipe is a small complete job. What the lab verified is stated in the recipe; anything carried in from the project's documentation says so.
1. A status page for a handful of home services
The guide's own arc, gathered into one file. Verified in the lab end to end.
web:
address: 127.0.0.1
port: 8085
storage:
type: sqlite
path: /home/you/gatus/data.db
alerting:
custom:
url: "http://127.0.0.1:8735/alert"
method: "POST"
headers:
Content-Type: "application/json"
body: |
{
"event": "[ALERT_TRIGGERED_OR_RESOLVED]",
"endpoint": "[ENDPOINT_NAME]",
"description": "[ALERT_DESCRIPTION]",
"errors": "[RESULT_ERRORS]"
}
endpoints:
- name: front-page
group: lab
url: "http://127.0.0.1:8734/"
interval: 10s
conditions:
- "[STATUS] == 200"
- "[BODY] == pat(*lab web page is up*)"
- "[RESPONSE_TIME] < 500"
Swap in your own services, groups named
for their shelves (media, network,
home), one alert per endpoint that
matters, and intervals of 60s or more
for anything off the machine. It is the
lab config — gatus-lab/config.yaml —
with the teaching numbers grown up.
2. Run the binary as a systemd service
Documented pattern, assembled from chapter 3's verified pieces; the lab ran Gatus in a terminal instead.
[Unit]
Description=Gatus health dashboard
After=network.target
[Service]
User=gatus
WorkingDirectory=/home/gatus
ExecStart=/home/gatus/gatus
Environment=GATUS_CONFIG_PATH=/home/gatus/config.yaml
Restart=on-failure
[Install]
WantedBy=multi-user.target
Restart=on-failure matters more than
it looks: combined with SQLite storage
(chapter 8), a crash costs one missed
interval, not the board's memory.
3. Badges in a project README
Verified in the lab (chapter 7). One line of Markdown where the README wants a health signal:


Replace the address with wherever your Gatus is reachable from the README's readers — and pause on chapter 11's caution before making that a public internet address.
4. One alert shape for every endpoint
Documented, not run in the lab. Set the shape once on the provider:
alerting:
custom:
url: "http://127.0.0.1:8735/alert"
method: "POST"
default-alert:
description: "health check failed"
send-on-resolved: true
failure-threshold: 3
success-threshold: 2
Endpoints then carry only
- type: custom. Endpoints that need
different numbers override them in
their own alerts: entry. The default
supplies the numbers — the type must
still be named per endpoint.
5. Split a growing config into files
Documented, not run in the lab.
GATUS_CONFIG_PATH may point at a
directory: every *.yaml file in it
(and its subdirectories) is merged —
maps deep-merged, endpoint lists
appended, a setting defined in two
files with two values is an error, by
design. One file per group is the
natural split as a board grows:
gatus-config/
00-base.yaml (web, storage, alerting)
media.yaml (the media group's endpoints)
network.yaml (the network group's endpoints)
6. Watch a certificate's expiry date
Documented, not run in the lab (the lab had no TLS service of its own to watch). Any HTTPS endpoint carries the fact; the condition simply joins the list:
- name: shop-front
url: "https://shop.example.com/"
interval: 1h
conditions:
- "[STATUS] == 200"
- "[CERTIFICATE_EXPIRATION] > 720h"
720 hours is thirty days — the alert arrives while there is still time to renew, which is the only kind of expiry warning worth having. An hourly check is plenty; certificates do not change by the minute.