跳到正文

此页面目前仅提供英文版本。

Monitors

Watch an endpoint on a schedule, or let a scheduled job report in.

Monitors tell you when something stops answering. There are two kinds.

HTTP checks

KeepSafe calls a URL on a schedule and checks the answer.

  • URL and method: any public http or https address, with GET, HEAD, POST or PUT.
  • Expected status: the response code that counts as healthy, 200 by default.
  • Interval: how often to check, from every minute to every hour.
  • Timeout: how long to wait before a check counts as failed.
  • Slow threshold: the response time above which the endpoint counts as slow.
  • Failures before down: how many failed checks in a row it takes to raise an alert, so a single blip stays quiet.

If the endpoint needs them, you can add request headers and a request body.

Heartbeats

Some jobs cannot be reached from outside: backups, scheduled tasks, workers on a private network. For these, the job calls KeepSafe instead.

  1. Create a monitor and choose Heartbeat.
  2. Copy the ping URL KeepSafe gives you.
  3. Make your job call that URL each time it finishes.

Set how often the job runs and a grace period. If no ping arrives in time, the monitor goes down and you are alerted.

Statuses

  • Up: the last check passed.
  • Slow: it answered, but more slowly than your threshold.
  • Down: it failed as many times in a row as you allowed.
  • Paused: you paused it; no checks run.

Pausing

Pause a monitor during planned maintenance so it does not raise alerts. Resume it when you are done.