💓 Heartbeat Monitor
The Heartbeat monitor is different from all other monitors — it's passive. Instead of Monitron checking your service, your service sends a "ping" to Monitron at regular intervals. If a ping isn't received within the expected timeframe, Monitron knows something is wrong.
🎯 Que Hace
- Listens for incoming HTTP pings from your services
- Each heartbeat monitor has a unique token URL
- If no ping is received within the interval + grace period, marks as Down
- Creates an incident automatically on failure
🔗 How It Works
Your Service ──── HTTP GET/POST ────→ Monitron
│
Every 5 minutes │
(your schedule) ├── Ping received? ✅ Up
│
If no ping for │
interval + grace ──→ ├── No ping? ❌ Down
⚙️ Configuracion
| Configuracion | Descripcion | Ejemplo |
|---|---|---|
| Name | What this heartbeat monitors | Nightly Backup |
| Label | Address field serves as a label | backup-cron |
| Check Interval | How often you expect a ping | 5 minutes |
| Grace Period | Extra time before marking down | 60 seconds |
🔗 Your Heartbeat URL
After creating a heartbeat monitor, Monitron generates a unique URL:
https://your-monitron.com/heartbeat/abc123def456
Send a GET or POST request to this URL from your service.
📖 Ejemplos de Uso
See the Heartbeat Monitoring section for detailed integration examples with cron jobs, Laravel, Node.js, Python, and more.
⚠️ Failure Endpoint
To explicitly report a failure, send a POST to:
https://your-monitron.com/heartbeat/abc123def456/fail
This immediately marks the monitor as Down and creates an incident, even if the regular interval hasn't expired yet.
💡 Consejos
- Always add a grace period! Network delays, slow cron starts, or slight timing variations can cause false alerts. A 60-second grace period handles this.
- Use the failure endpoint in your error handling:
my-backup-script.sh || curl https://your-monitron.com/heartbeat/TOKEN/fail