Heartbeat: Scheduled Task Monitoring
Make sure your crons and scripts run correctly.
Heartbeat monitoring allows you to monitor tasks that should run at regular intervals.
Your script sends a ping to MoniTao after each successful run. No ping = alert.
Operating principle
Heartbeat works on a simple principle:
- You create a job with an expected interval (e.g., every 24h)
- Your script calls our API at the end of each execution
- If the call doesn't arrive on time, you are alerted
API Endpoints
Three endpoints available for different cases:
POST /api/heartbeat/start/{ping_token}- /start - Signals the start of a taskPOST /api/heartbeat/ping/{ping_token}- /ping - Signals successful completionPOST /api/heartbeat/fail/{ping_token}- /fail - Signals a failure
Included features
Cron Monitoring
Monitor scheduled tasks
Backup Monitoring
Verify automatic backups
Import Monitoring
Monitor data imports
Long Jobs
Monitor long-running jobs
cURL Examples
Integration with cURL and scripts
Grace period
Configure a grace period to account for variations in execution time. The alert is only sent after this period has elapsed.
Use Cases
- Backup cron monitoring
- Data import monitoring
- Queue job verification
Configuration
- Create a heartbeat job in MoniTao
- Copy the provided ping URL
- Add a curl at the end of your script
Frequently Asked Questions
What's the difference between start, ping and fail?
Start signals the beginning, ping signals successful completion, fail signals explicit failure.
What happens if my job is late?
After the configured grace period, an alert is sent.
Can I monitor hourly jobs?
Yes, the interval is configurable from 1 minute to several days.
Does heartbeat work with all languages?
Yes, any language capable of making HTTP requests can use heartbeat.
Useful Links
Ready to Sleep Soundly?
Start free, no credit card required.