Send a website down alert from your server
Run a simple website availability check from a server using curl. Send a BotPings alert if the endpoint times out or returns an HTTP error.
Shell · cron · 3 min · Servers and scripts
Before you start
Use a health URL that you own and can check regularly. Put the BotPings key in BOTPINGS_KEY and the target URL in HEALTH_URL.
Steps
Set up the check
Save this wrapper on a separate host that can reach both the health endpoint and BotPings.
if ! curl -fsS --max-time 10 "$HEALTH_URL" >/dev/null; then
curl -fsS --max-time 15 https://botpings.com/send \
-H "Authorization: Bearer $BOTPINGS_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Website health check failed","priority":"urgent","dedupeKey":"public-health"}'
fiSchedule it
Run the wrapper from cron or a timer. Use a schedule and channel dedupe window suited to the alert volume.
Watch the checker itself
Add a separate BotPings check-in if you also need to know when the host running the checker stops reporting.
Test it
Temporarily point HEALTH_URL at a failing test endpoint you own. Verify the failure alert in the demo channel, then restore the working URL.
If it doesn’t work
- The endpoint redirects. Use the final health URL and check its response.
- The alert failed too. Check the checker’s outbound access and key.
- Too many repeats. Review the channel’s merge window and the checker’s interval.
Related guides
Checked with BotPings 1.0 in a local test environment, November 2026.