Creating Heartbeat Monitors

This guide walks through creating a heartbeat monitor and integrating it with your scheduled processes.

Create the Monitor

  1. Navigate to Heartbeats in the sidebar
  2. Click Add Heartbeat
  3. Configure the settings (detailed below)
  4. Click Save

Configure Settings

Name

Enter a descriptive name that identifies the process being monitored:

  • “Daily Database Backup”
  • “Hourly Report Generation”
  • “Queue Worker Health Check”

Expected Interval

Select how often your process should send a ping. Choose the interval that matches your process schedule:

If your process runs… Select interval
Every 30 seconds 30s
Every minute 1m
Every 5 minutes 5m
Every 15 minutes 15m
Every 30 minutes 30m
Every hour 1h
Every 2 hours 2h
Every 4 hours 4h
Every 6 hours 6h
Every 8 hours 8h
Every 12 hours 12h
Daily 24h

Grace Period

Additional time before marking a heartbeat as failed. Upstat automatically sets this to 50% of the expected interval, but you can adjust it.

When to increase grace period:

  • Variable execution times (backup of growing database)
  • Network latency concerns
  • Process that sometimes runs longer

When to decrease grace period:

  • Critical processes needing fast failure detection
  • Processes with consistent, predictable runtime

Get Your Heartbeat URL

After saving, the heartbeat detail page displays your unique URL:

Click the copy icon to copy the URL to your clipboard.

Integrate with Your Process

Cron Job Integration

Add a curl command after your script completes:

Update your crontab:

The -fsS --retry 3 flags ensure:

  • -f - Fail silently on HTTP errors
  • -s - Silent mode (no progress output)
  • -S - Show errors when silent
  • --retry 3 - Retry up to 3 times on failure

Systemd Timer Integration

For systemd-based scheduling:

Application Code

Kubernetes CronJob

Configure Alerts

Heartbeats trigger alerts when pings stop arriving. Configure notifications:

  1. Open the heartbeat detail page
  2. Click the settings menu
  3. Select Automations
  4. Add notification channels (Slack, email, SMS)

See Monitor Automations for detailed alert configuration.

View Heartbeat Status

The heartbeat detail page shows:

  • Current status - Success (receiving pings) or fail (missed pings)
  • Last heartbeat - Time since most recent ping
  • Consecutive failures - How many pings missed in a row
  • Success rate - Percentage of pings received on time

Use the time selector (24h, 1w, 1m, 1y) to view historical data.

Test Your Integration

  1. Manually trigger your process
  2. Check the heartbeat detail page
  3. Verify “Last Heartbeat” updates
  4. Confirm status shows “success”

If the heartbeat doesn’t register:

  • Verify the URL is correct
  • Check network connectivity from your server
  • Ensure curl or your HTTP client is working