Zum Hauptinhalt springen

📖 Heartbeat Monitoring Overview

Heartbeat monitoring is a passive monitoring approach. Instead of Monitron reaching out to check your service, your service sends a "ping" to Monitron at regular intervals. If the ping stops coming, Monitron knows something is wrong.


🎯 Perfect For

  • Cron jobs — Is my nightly backup actually running?
  • 📋 Scheduled tasks — Did the daily report generation complete?
  • 🔄 Background workers — Is my queue processor still alive?
  • 📦 Batch processes — Did the data import finish?
  • 🤖 Custom scripts — Anything that runs on a schedule

🔧 Funktionsweise

  1. Create a Heartbeat monitor in Monitron
  2. You get a unique URL: https://your-monitron.com/heartbeat/{token}
  3. Add a ping at the end of your script/job
  4. Monitron expects a ping every interval seconds
  5. If no ping arrives within interval + grace, Monitron marks it Down

🔗 Two Endpoints

✅ Success Ping

GET or POST https://your-monitron.com/heartbeat/{token}

Call this when your job completes successfully.

❌ Failure Report

POST https://your-monitron.com/heartbeat/{token}/fail

Call this when your job fails. This immediately creates an incident.


⚙️ Konfiguration

EinstellungBeschreibungRecommendation
IntervalHow often you expect a pingMatch your cron schedule
Grace PeriodExtra time before alerting60 seconds minimum

Example

If your cron runs every 5 minutes:

  • Set Interval to 5 minutes
  • Set Grace Period to 60 seconds
  • Monitron will alert if no ping arrives within 6 minutes