# Heartbeat URL

kogut calls an external service every minute, which alerts when the calls stop.

kogut calls a URL at an external monitoring service every minute, and the service alerts
you when the calls stop. Use a service on other hardware and another network.

## Configure the watchdog

1. At the external service, create a check with a one-minute period, a grace period that
   covers short interruptions, and a notification destination.
2. Copy the check's ping URL.
3. Open **Settings → Watching kogut**, click **Set up** beside **Heartbeat URL**, paste
   the URL, and save. kogut calls it immediately, then every minute.

   In `kogut.toml`:

   ```toml
   [server]
   heartbeat_url = "${HEARTBEAT_URL}"
   ```

4. Check the last delivery in the panel. Stop kogut for longer than the service's period
   and grace time, and confirm that its alert arrives.

Keep the URL secret: anyone with it can report that kogut is running. A URL saved in the
panel is not shown again. File settings take precedence and make the panel field
read-only. See [Server configuration](https://docs.kogut.dev/reference/configuration/#server).

## Check failed requests

The panel shows the URL's host, the last successful call, and any failure. The log
records failures as `the call to the heartbeat URL failed`, without the URL.

Calls use `GET`, a 10-second timeout, and at most two redirects. Only `2xx` counts as
success.

You can use this and [kogut edge](https://docs.kogut.dev/high-availability/kogut-edge/) at the same time.
