Uptimecat

Heartbeat monitoring

A heartbeat monitor flips the usual direction. Your job calls Uptimecat, and an alert fires if the call does not arrive in time.

Why use it

Normal monitors check from outside. That works for websites and ports, but not for a nightly backup or a queue worker that has no public address. A heartbeat monitor watches for silence instead. If nothing arrives within the interval, the monitor goes down and your alert channels fire.

It is the right tool for cron jobs, backups, data syncs, certificate renewals and workers behind a firewall. The cron job monitoring page covers the idea in more depth.

Set it up

  1. In the dashboard choose Add New Monitor and set the type to Push.
  2. Name it after the job. Set the Heartbeat Interval to a little longer than the schedule. For a daily job, use 25 hours, in seconds.
  3. Save. The monitor shows a push URL that ends in a token. Copy it.
  4. Call the URL from the end of your job. Only call it when the job succeeded.
  5. Attach an alert channel and check that the monitor turns green after the first call.

Example

# at the end of a backup script
curl -fsS -m 10 "https://dashboard.uptimecat.co/api/push/YOUR_PUSH_TOKEN?status=up&msg=backup%20ok&ping=42"

# report failure at once
curl -fsS -m 10 "https://dashboard.uptimecat.co/api/push/YOUR_PUSH_TOKEN?status=down&msg=backup%20failed"

Parameters

ParameterDefaultMeaning
statusupup or down
msgOKMessage shown with the heartbeat
pingemptyDuration in milliseconds, shown in the chart

Avoid false alerts

  • Add margin to the interval. Jobs vary in run time.
  • Use retries if a short delay is acceptable.
  • Use a maintenance window when you deploy or reboot planned jobs.
  • Send the heartbeat from the job itself, not from a separate always-on timer, or you will not notice failures.
  • Keep the URL private. It is the only credential.

Typical uses

  • Nightly database or file backups.
  • Report generators and data imports.
  • Queue workers and schedulers that run inside a private network.
  • Certificate renewal jobs.
  • Any script where silence is the failure.

Frequently asked questions

GET or POST?

Both work.

What if my server cannot reach the internet?

Then the heartbeat cannot arrive. Allow outbound HTTPS to the dashboard host.

Can one job report many heartbeats?

Use one monitor per job or step, so each failure is clear.

Related

Open the dashboard

Sign in with your Google account to add a monitor and pick an alert channel. Access is currently limited to Moruk accounts; open sign-up is not available yet.

Sign in