Healthchecks.io push notifications
Healthchecks.io webhooks send down and up alerts to your phone through PushPiper, free for 10,000 messages a month on 10 devices. Webhooks are included on the free Hobbyist plan with 20 checks, and setup takes two POST requests, one for failures and one for recoveries.
How Healthchecks.io webhooks talk to PushPiper
Healthchecks.io monitors cron jobs and background tasks by waiting for a periodic ping. When a task stops running or pings the failure endpoint, Healthchecks triggers its alert channels. Instead of paying per-message carrier fees for SMS or buying native app licenses, you can post alerts directly to PushPiper's API endpoint. PushPiper handles delivery to your phone or desktop browser via Web Push.
The integration uses simple HTTP requests. Healthchecks.io allows you to define separate request bodies for when a check goes down and when it recovers. PushPiper accepts these incoming events as flat JSON payloads sent to its messages endpoint. Because PushPiper implements the same parameters as Pushover, you get delivery receipts, custom notification sounds, and urgency priority levels out of the box.
Reliability is built into the exchange. Healthchecks.io enforces a 30-second timeout on each notification attempt and retries a failed call up to 2 more times. It treats any response code of 200, 201, 202, or 204 as a successful delivery. When PushPiper accepts your alert, it responds immediately with HTTP 200 and a JSON payload containing the request ID.
- Healthchecks.io Hobbyist accounts include webhooks for up to 20 checks with 100 log entries per check.
- PushPiper processes up to 600 requests a minute per application token on every plan.
- Payloads must use flat JSON structures containing only strings, numbers, or booleans.
Setting up the down and up webhooks
You configure the notification channel once in Healthchecks.io, and you can then assign it to any of your monitored jobs. The setup separates down alerts from recovery notices so your phone rings with a high-priority siren when a job fails and uses normal priority (silent during quiet hours) when it comes back up.
- In Healthchecks.io, open Integrations and select Webhook.
- Scroll to the down section, set the request method to POST, and enter
https://api.pushpiper.com/1/messages.jsonas the URL. - Add the request header
Content-Type: application/jsonso PushPiper parses your incoming text as structured JSON. - Paste the down JSON payload into the request body field.
- Scroll down to the up section, select POST, enter the same URL and header, and paste the recovery JSON payload.
- Save the integration and attach it to your checks.
Here is how the settings compare between the two notification states:
| Setting | Down | Up |
|---|---|---|
| Method | POST | POST |
| URL | https://api.pushpiper.com/1/messages.json | https://api.pushpiper.com/1/messages.json |
| Header | Content-Type: application/json | Content-Type: application/json |
| Title | $NAME_JSON | $NAME_JSON |
| Priority | 1 with the siren sound | 0 |
For the down notification body, use this template:
{
"token": "APP_TOKEN",
"user": "USER_KEY",
"title": $NAME_JSON,
"message": "Down since $NOW",
"priority": 1,
"sound": "siren"
}In this payload, replace APP_TOKEN with your 30-character PushPiper application token and USER_KEY with your 30-character user key. The siren sound alerts you immediately, and priority 1 ensures the message ignores your quiet hours.
For the recovery notification body, use this payload:
{
"token": "APP_TOKEN",
"user": "USER_KEY",
"title": $NAME_JSON,
"message": "Back up at $NOW"
}Replace APP_TOKEN and USER_KEY with the same credentials as before. The recovery payload omits the priority and sound fields, which defaults the alert to priority 0 and uses your default sound during normal daytime hours.
Handling check names safely with JSON variables
Healthchecks.io provides dynamic template variables that insert runtime details into your webhook payloads. The most common mistake in webhook setups involves check names containing quotation marks. If your check is named Nightly "Prod" Backup and you use the standard $NAME variable inside a quoted JSON string, the resulting payload contains broken quotes that fail JSON syntax validation.
Healthchecks solves this problem with the $NAME_JSON variable. This variable evaluates to the check name with quotes and special characters already escaped and wrapped in quotation marks. Because $NAME_JSON produces its own surrounding quotes, you must write "title": $NAME_JSON without adding extra quotes around the variable in your request body. If you write "title": "$NAME_JSON", the JSON encoder receives a double-quoted string and rejects the format.
You can also include $NOW in the message string to display the exact time Healthchecks registered the state change. PushPiper limits message strings to 1,024 characters and titles to 250 characters. Because check names and timestamps are brief, these payloads remain well below PushPiper's size limits. For more advanced payload formatting options, consult the API reference.
Waking up for critical backup failures with priority 2
Some cron jobs run non-essential maintenance, but database dumps and offsite backups cannot fail silently. When you need an alert that demands immediate attention for an unattended server failure, PushPiper supports emergency priority 2 alerts.
Priority 2 alerts repeat continuously until someone manually acknowledges the notification in the app. To use priority 2 in Healthchecks.io, you must add two required fields to your down payload: retry and expire. The retry parameter specifies how many seconds PushPiper waits between repeats, with a minimum interval of 30 seconds. The expire parameter sets the cutoff time in seconds, with a maximum limit of 10,800 seconds (3 hours).
Does an emergency alert break through an iPhone set to Focus mode? No. PushPiper delivers via standard Web Push, which means it cannot send iOS critical alerts that break through Apple's Do Not Disturb or Focus modes. PushPiper does not make automated phone calls or send cellular SMS texts. It also does not manage shift rotations or escalation policies. If you need loud repeating alerts on your desk or laptop while working, priority 2 repeats up to 50 times or until you tap Acknowledge in the application interface.
Triggering pings from your cron jobs
A dead man's switch monitor works from the outside. Your server does not need to send an alert when it crashes because Healthchecks alerts you when the expected ping never arrives. This catches power failures, frozen kernels, broken network connections, and killed cron daemons that internal scripts fail to catch. You can review how this protects scheduled tasks in our guide on cron job monitoring.
To report both successes and failures from your crontab, use a command string that hits your unique Healthchecks ping address:
0 3 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/YOUR-UUID || curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/YOUR-UUID/failIn this snippet, replace YOUR-UUID with the unique identifier assigned to your check in the Healthchecks.io dashboard. You must also replace /usr/local/bin/backup.sh with the actual path to the script or binary you want to run.
The command uses shell operators to handle both outcomes cleanly. The && operator executes the first curl call only if the backup script exits with a status code of 0. If the script exits with an error status, the || operator skips the success ping and immediately curls the /fail endpoint instead. Healthchecks reports the failure right away and triggers your down webhook to PushPiper instead of waiting for a missed ping. For more command line examples, see our guide on push notifications from shell scripts and cron jobs. If you are switching your infrastructure away from legacy notification tools, our walkthrough on how to migrate from Pushover explains how PushPiper handles drop-in URL replacements.
Sources
Questions and answers
Can I monitor my checks on my phone without installing an app from an app store?
Yes. PushPiper runs as a Web Push application that you install directly from your browser on Android, Windows, macOS, and Linux. On an iPhone or iPad running iOS 16.4 or later, open pushpiper.com/app in Safari, tap the Share button, and select Add to Home Screen.
What happens if my Healthchecks ping fails due to a brief network drop?
The curl snippet uses the retry flag to retry sending the ping up to 5 times before giving up. If the ping still does not arrive in time, Healthchecks.io marks the check down and fires the webhook to PushPiper.
Can I direct Healthchecks alerts to a specific team group instead of one user?
Yes, you can replace the user key in the webhook payload with a PushPiper group key. PushPiper allows you to create up to 100 groups with up to 500 members each, and a single webhook delivery fans out to every member in the group.
Does Healthchecks retry when a webhook call fails?
Yes. Healthchecks.io enforces a 30-second timeout and treats HTTP status codes 200, 201, 202, and 204 as successful. If a call times out or receives an error code such as HTTP 400 or 429 from the PushPiper API, Healthchecks retries the request up to 2 more times.