The Goal

I want a small, boring monitor that checks if things are up and pings my phone when they aren’t. It has to run on hardware I already own: a Synology NAS with spinning disks. So:

  • Tiny footprint.
  • Zero disk writes, so the disks can keep sleeping. My NAS sits in the living room, and spinning disks make noise. Every write wakes them up with a whirr and a click. I want it quiet.
  • Push notifications on my phone, without an account or a mail server.

Gatus plus ntfy ticks all three boxes. And you can point it at pretty much anything that speaks HTTP: websites, APIs, JSON values, even a temperature sensor.

My favourite use? I do PRTG for a living, and I use Gatus to monitor my PRTG instances. Because who monitors the monitoring? If PRTG goes down, PRTG is not going to tell you. 😉

This post is the how-to, and also my own documentation for when I touch this setup again in a year.

How Gatus Works

Gatus is a single Go binary with one YAML file. Per endpoint you set:

  • a URL (HTTP, but also tcp:// and DNS checks),
  • an interval,
  • one or more conditions, for example [STATUS] == 200, [RESPONSE_TIME] < 500, [CERTIFICATE_EXPIRATION] > 168h or a value in the JSON body like [BODY].status == Up,
  • alerts: when to notify and where.

You get a clean status page and alerts to almost anything: Slack, Teams, Discord, mail, ntfy. No database needed, no agents, nothing to click through.

Files on the NAS

Everything lives in one folder on the NAS, /volume1/docker/gatus:

docker-compose.yml   # the container
config.yaml          # all endpoints and alerts
.env                 # API keys and tokens (not in git)

Docker Compose Without Touching the Disk

services:
  gatus:
    image: twinproduction/gatus:latest
    container_name: gatus
    ports:
      - "8888:8080"
    tmpfs:
      - /tmp
    env_file:
      - .env
    volumes:
      - ./config.yaml:/config/config.yaml:ro
    restart: unless-stopped

Three choices make this disk-friendly:

  • storage: type: memory in the Gatus config. No SQLite file, so no writes to /data.
  • tmpfs: /tmp, so temporary files live in RAM.
  • The config is mounted read-only.

docker stats shows Block I/O at 0B / 0B. The trade-off: after a restart the history is gone. For an “is it up right now?” monitor, that’s fine.

The status page is at http://<nas>:8888.

Secrets in .env

PRTG_TOKEN=...
GOVEE_API_KEY=...

Gatus replaces $VAR_NAME in config.yaml with the environment variable. So tokens never end up in the YAML, and the YAML can safely go into git.

Alerts via ntfy

ntfy is a pub/sub push service. You pick a topic name, subscribe to it in the ntfy app on your phone, and anything that POSTs to that topic shows up as a notification. On the public ntfy.sh server the topic name is the password, so make it long and random.

storage:
  type: memory

ui:
  header: My Monitor

alerting:
  ntfy:
    url: https://ntfy.sh
    topic: gatus-<long-random-string>
    priority: 4

Good to know: ntfy.sh only keeps messages for 12 hours. It’s a notification channel, not an archive.

Example 1: Is the Website Up?

The simplest check, and the template for everything else:

endpoints:
  - name: prtg - web
    url: https://prtg.example.com
    interval: 60s
    conditions:
      - "[STATUS] == 200"
    alerts:
      - type: ntfy
        failure-threshold: 2
        success-threshold: 1
        send-on-resolved: true
        description: "DOWN"
      - type: ntfy
        failure-threshold: 242
        success-threshold: 1
        description: "Still DOWN after 4 hours"
  • failure-threshold: 2: notify after 2 failed checks in a row (about 2 minutes). One hiccup doesn’t wake you up.
  • send-on-resolved: true: you also get a message when it’s back.
  • The second alert is a cheap trick. Gatus has no “remind me every X hours”. But at a 60-second interval, 240 extra failures is roughly four hours. So an outage gives you one ping after two minutes and one reminder after four hours.

Example 2: A Value From a JSON API

A web page that answers doesn’t mean the monitoring works. For PRTG I also check if the probe is connected, via the PRTG API:

  - name: prtg - probe
    url: "https://prtg.example.com/api/table.json?content=probes&filter_name=MY-PROBE&output=json&apitoken=$PRTG_TOKEN"
    interval: 60s
    conditions:
      - "[STATUS] == 200"
      - "[BODY].probes[0].status == Up"
    alerts:
      # same two alerts as above

[BODY] uses gjson-style paths. Write the value without quotes (== Up, not == "Up").

This pattern works for any API that returns JSON: a health endpoint, a queue length, a backup status. If you can get it with curl, Gatus can check it.

Example 3: A Sensor (Temperature and Humidity)

I have a Govee H5179 Wi-Fi thermometer/hygrometer. Govee has an official OpenAPI (request a key in the Govee Home app), and Gatus can POST:

  - name: Govee - Temperature (12-30°C)
    url: "https://openapi.api.govee.com/router/api/v1/device/state"
    method: POST
    headers:
      Govee-API-Key: "$GOVEE_API_KEY"
      Content-Type: application/json
    body: '{"requestId":"gatus","payload":{"sku":"H5179","device":"<device-id>"}}'
    interval: 60s
    ui:
      dont-resolve-failed-conditions: true
    conditions:
      - "[STATUS] == 200"
      - "[BODY].payload.capabilities[0].state.value == true"   # online
      - "[BODY].payload.capabilities[1].state.value >= 54"     # ~12°C
      - "[BODY].payload.capabilities[1].state.value < 86"      # 30°C
    alerts:
      - type: ntfy
        failure-threshold: 15
        success-threshold: 15
        send-on-resolved: true
        description: "Temperature outside 12-30°C (15 min in a row)"

Humidity is a second endpoint with the same call, checking capabilities[2] (I use 30-70%). Splitting them means the notification tells you straight away which value is wrong.

Things to know about this one:

  • Fahrenheit only. The API returns °F and Gatus can’t do math in conditions. So the thresholds are in °F and the endpoint name carries the Celsius range. dont-resolve-failed-conditions keeps the confusing Fahrenheit number out of the alert.
  • Address by index. The response is an array of capabilities. Gatus doesn’t support gjson filters like #(instance=="sensorTemperature"), so use [0] online, [1] temperature, [2] humidity.
  • Whole numbers, >= and < only. In my tests Gatus compares the value as an integer (33.7 shows up as (33)). With that truncation only >= and < with whole numbers behave exactly right. Avoid > and <=.
  • No history in the API. It only gives the current value. For history, use the export in the Govee app.

Sensors Need Hysteresis

Up/down checks and sensor values behave differently. A website is either up or down. A temperature can sit right on your threshold for hours, wobbling across it with every new reading. With failure-threshold: 2 and success-threshold: 1 every wobble is two notifications. I found that out the hard way: about 70 a day, from a room that sat at 14.9°C with the threshold at 15°C.

Gatus has no hysteresis setting, but the two thresholds together do the job:

  • failure-threshold: 15: wrong for 15 minutes in a row before you hear about it.
  • success-threshold: 15: right for 15 minutes in a row before it says “resolved”.

The Govee sensor only sends a new value about every 10 minutes, so a single wobble can’t trigger anything anymore. I also dropped the 4-hour reminder for sensors: a temperature that’s slightly off isn’t an outage.

And pick the thresholds from real data, not gut feeling. I exported five months of hourly values from the Govee app and replayed them against a few ranges. My original 40-55% humidity range would have been red 74% of the time. With 30-70% only the real humid spells are left, and those matter because of my wooden floor.

Day-to-Day Operations

On a Synology, Docker needs root, so use sudo in the Gatus folder:

cd /volume1/docker/gatus
sudo docker compose up -d          # start, or recreate after editing docker-compose.yml
sudo docker compose logs -f gatus  # watch the checks and alerts
sudo docker compose down           # stop

Changing config.yaml needs no restart. Gatus notices the changed file and reloads it by itself, in my case within about 20 seconds. One catch: the config is a single-file bind mount. Overwrite the file in place (edit it, or cat new.yaml > config.yaml) instead of replacing it with a new file, so the container keeps seeing the same file.

Changing docker-compose.yml or .env does need docker compose up -d. A plain restart doesn’t pick up compose changes.

Want to check the results without the web page? The API gives you every endpoint with its latest checks and which condition failed:

curl -s http://localhost:8888/api/v1/endpoints/statuses

Before you change a config, make a backup: cp -p config.yaml config.yaml.bak-$(date +%Y%m%d).

Adding a New Check

  1. Copy an existing endpoint block in config.yaml.
  2. Change name, url and conditions. Test the URL with curl first, so you know what the body looks like.
  3. Put any token in .env and refer to it with $NAME (then run docker compose up -d, because .env changed).
  4. Save, wait half a minute, and check the status page.

Three Takeaways

  1. storage: memory plus a read-only config makes Gatus perfect for a NAS with spinning disks. Zero writes, tiny footprint.
  2. If you can curl it, Gatus can monitor it. Use it to watch your monitoring too.
  3. Sensors need hysteresis: set failure-threshold and success-threshold, and pick the thresholds from real data.

Full disclosure: I built and tuned this setup together with my AI assistant. It crunched the sensor data so I didn’t have to. 😉

Happy monitoring!