Setting Up Heartbeat Monitoring
Heartbeat monitoring watches over processes that cannot be checked from the outside. Your process sends a regular signal to live24h. If the signal does not arrive, you get notified.
Create a Heartbeat
- In the dashboard, create a new check of type Heartbeat
- Define the expected interval (e.g. “every 60 minutes”)
- Optionally set a grace period (tolerance time)
- You will receive a unique heartbeat URL
https://hb.live24h.eu/abc123def456
Integration with Different Systems
Linux Crontab
# Backup script with heartbeat
0 2 * * * /usr/local/bin/backup.sh && curl -fsS --retry 3 https://hb.live24h.eu/abc123
Windows Task Scheduler
# At the end of your PowerShell script
Invoke-WebRequest -Uri "https://hb.live24h.eu/abc123" -Method GET -UseBasicParsing
Docker / Kubernetes
# Health check with heartbeat
HEALTHCHECK CMD curl -f http://localhost:8080/health && curl -fsS https://hb.live24h.eu/abc123
.NET / C#
// At the end of your background job
using var client = new HttpClient();
await client.GetAsync("https://hb.live24h.eu/abc123");
Python
# At the end of your script
import requests
requests.get("https://hb.live24h.eu/abc123")
Node.js
// At the end of your job
const https = require('https');
https.get('https://hb.live24h.eu/abc123');
Error Handling
Only send the heartbeat on success. This way, live24h automatically detects when a job fails:
#!/bin/bash
if /usr/local/bin/backup.sh; then
curl -fsS https://hb.live24h.eu/abc123
else
echo "Backup failed" >&2
exit 1
fi
Best Practices
- Send the heartbeat at the end of the process, not at the beginning
- Use
curl --retry 3for reliable delivery - Set the grace period to at least twice the runtime of your job
- Monitor critical jobs with shorter intervals
Availability
Heartbeat monitoring is available from the Pro plan.