Can something reach the thing, or did the thing run? That one question decides which monitor you need. If the thing is a website or an API, you want to know whether someone can reach it. If the thing is a job that runs on a schedule, you want to know whether it ran and finished. The two monitor types answer different questions, and most people who run their own sites need both.
An uptime monitor checks from outside
An uptime monitor sends requests to an address, such as a public site, a login page or an API endpoint. It checks from outside your server. When the address stops answering, it tells you. It answers one question: can someone reach this right now?
You set a failure threshold on the monitor. It alerts only after that many failed checks in a row, so a single slow response does not wake you at night. Every HTTPS monitor also checks the site's certificate and warns you before it expires. The warning timing is set by default and can be changed for each monitor.
A heartbeat monitor waits for a check-in
A heartbeat monitor works the other way round. Your job checks in each time it succeeds. The monitor waits for that check-in. If a check-in is late, you get an alert. It answers a different question: did the thing run?
This suits cron jobs and backups. A backup script that fails quietly will not show up on a site check, because the site is still up. A heartbeat catches the missing run. The job does the work, then sends its check-in. If the check-in never arrives, the monitor raises the alert.
Cases that need an uptime monitor
Use an uptime monitor for anything a visitor or a client touches directly. A public site is the obvious case. A login page matters too, because a sign-in that does not load stops every user, even if the rest of the site is fine. An API endpoint that other services call belongs on the list for the same reason.
In each case the question is whether the address answers. If it does not, the people who depend on it are affected straight away, and you want to hear about it before they tell you.
Cases that need a heartbeat monitor
Use a heartbeat monitor for work that runs without anyone watching it. A nightly backup is the clearest example. Nobody visits a backup, so an uptime check tells you nothing about whether last night's copy was made.
A scheduled report works the same way. The report may go out fine for months, then stop after a change to a database or a server. A clean-up cron job, which removes old files or expired sessions, can also stop without any visible sign. A heartbeat tells you when it stops running, which is the only time you would notice.
Cases that need both
A web app with a background worker needs both monitors. The web app answers requests, so an uptime monitor covers it. The background worker handles email, image processing or payment follow-up, and it can stop while the web pages still load. A heartbeat on the worker catches that.
If you only had the uptime monitor, the app would look healthy while the worker sat idle. If you only had the heartbeat, you would miss a site that went down for visitors while the worker kept checking in. Two monitors cover the two ways the app can fail.
A worked example: one client site and one nightly backup
Take a freelancer who looks after one client's site and runs a nightly backup of its database. The site needs an uptime monitor on its public address. That monitor alerts only after the failure threshold is reached, and it also watches the HTTPS certificate.
The backup needs a heartbeat monitor. The backup script sends its check-in when it finishes successfully. If the script fails, or the server is switched off, the check-in is late and the alert goes out.
The two monitors cover different risks. The site monitor will tell you if the client's visitors cannot reach it. The heartbeat will tell you if you have no backup to restore from. Without the heartbeat, a site that stays up can hide a backup that has not run for a week.
Setting a failure threshold on the uptime monitor
A single failed check is often noise. A network hiccup, a brief restart or a slow response can cause one failure and then nothing. If every failure sent an alert, you would learn to ignore them.
Set the failure threshold to the number of failed checks in a row that you consider a real problem. A higher threshold means fewer false alarms but a slightly later alert. A lower threshold means faster warning but more noise. For a client site, most people pick a threshold that ignores brief blips and still reacts within a few minutes of a real outage.
Setting the expected interval on the heartbeat
A heartbeat monitor needs an expected interval, which is how often the job should check in. Set it to the normal run time plus some slack. A backup that usually finishes in twenty minutes should not alert because one night it took twenty-five.
If the interval is too tight, the monitor will raise false alerts whenever the job runs a little long. If it is too loose, a job that stops could go unnoticed for longer than you want. Watch a few normal runs, then set the interval with a sensible margin. For exact setup steps, the docs show the heartbeat settings in full.
A short checklist
For each thing you run, write down which kind of monitor covers it.
- Does a visitor, client or other service reach it directly? Use an uptime monitor.
- Does it run on a schedule without anyone watching? Use a heartbeat monitor.
- Does it do both, a web app with a worker or a site with a nightly job? Use both.
- Have you set a failure threshold on each uptime monitor?
- Have you set an expected interval on each heartbeat, with room for a slow run?
- Does each alert go to people in your organisation who can act on it?
If you run one site and a few nightly jobs, the free plan includes 10 monitors, which covers that setup. Start free at https://app.aperioflow.co.uk/#/signup