Docs
Heartbeat checks
A job that fails badly often can't tell you it failed: the server is off, cron stopped, the disk is full. A heartbeat check turns that around. Your job pings a URL each time it finishes, and bzzd alerts you when a ping doesn't come in time.
How it works
-
Add a check
Give it a name, how often the job runs (from every minute to once a week), how late it may be, and which app sends the alert.
-
Ping it from the job
Call the check's URL at the end of the job, only when the job succeeded. The check starts with the first ping, and never alerts before it.
-
Hear about the silence
If no ping arrives within the period plus the time it may be late, you get a high-priority "Name is down" on all the app's devices, and "Name is back up" with the next ping.
Examples
Cron
0 3 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://api.bzzd.io/ping/PING_KEY > /dev/null
At the end of a shell script
curl -fsS -m 10 --retry 3 https://api.bzzd.io/ping/PING_KEY
Without curl: wget -q -T 10 -O /dev/null https://api.bzzd.io/ping/PING_KEY
Windows (PowerShell, Task Scheduler)
Invoke-RestMethod -TimeoutSec 10 https://api.bzzd.io/ping/PING_KEY
Any tool that can open a URL works: GET, HEAD and POST all count, and the answer is a plain OK.
A ping never sends a notification by itself, and doesn't count towards your messages; only the alerts do.
Details
- Pause a check while a job is meant to be off, like during maintenance; it ignores pings and never alerts while paused.
- Changing how often a check runs keeps its URL, so nothing needs updating on the server.
- Free includes 5 heartbeat checks.
- Pro includes 50 heartbeat checks.
Try it on your phone
Free for 1 app, 3 devices and 1,000 messages a month. No card needed, and your real URLs come with your tokens filled in.
Create your free account