How to get alerted when a number stops moving
Some of the worst problems make no noise. The site is up, every health check is green, and nobody has signed up since the checkout change four hours ago. Or the import that runs every hour quietly stopped on Tuesday. Nothing failed loudly, so nothing told you.
Short answer: send each event or job run to a metric, then add an alert that fires when no data arrives for longer than the normal gap. In Umlogger that is a Records alert.
Why uptime checks miss this
An uptime monitor asks "does the page load?". It can't see that the signup form throws an error after you submit it, that the payment webhook points at an old URL, or that a cron job was deleted during a server move. Business numbers answer a different question: "is the thing that should be happening still happening?". Silence in one of them is often the first sign of a bug.
Step 1: send the event
Create a count metric and send 1 each time the event happens, right where it happens: after the signup is saved, after the order is paid, at the end of the job.
curl -fsS -G "https://data.umlogger.com/api/m" \ --data-urlencode "key=$UMLOGGER_ORDERS_KEY" \ --data-urlencode "value=1"
There are ready-made examples for Python, Node.js, Go, PHP, cron scripts and GitHub Actions.
Step 2: add a Records alert
On the metric's page, add an alert, choose Records, and pick how long a silence is too long. The alert fires when there is no data received in that window. Umlogger checks every minute and emails the metric's owner and everyone it's shared with.
The one rule: make the window clearly longer than the longest normal gap, about twice as long. Too short and quiet nights wake you up; too long and you find out late.
| What you watch | Normal gap | Window |
|---|---|---|
| Worker heartbeat every 5 minutes | 5 minutes | 1 hour |
| Hourly import job | 1 hour | 2 hours |
| Orders on a busy shop | Under an hour, even at night | 2 to 5 hours |
| Signups for a young SaaS | Several hours | 12 hours or 1 day |
| Job that runs every 6 hours | 6 hours | 12 hours |
Not sure what your normal gap is? Open the metric's chart for the last two weeks at hourly resolution and look for the longest run of empty hours.
What happens when it fires
You get an email as soon as the window passes without data. If the silence continues, Umlogger reminds you with growing gaps (after 5 minutes, then 10, 20 and so on, at most once a day), so a long outage doesn't flood your inbox. When data arrives again, the alert clears on the next check.
When the number drops but doesn't stop
A Records alert only notices silence. To catch "fewer than usual", alert on a number that represents the rate:
- For measurements such as response time or active users, use a Value alert ("the average value is less than 50 during the last 1 day") or a Change alert ("decreased by more than 40%" compared with the window before).
- For counts such as signups, these alerts look at the average sample, which is always 1 if you send 1 per event. Instead, add a small scheduled job that sends yesterday's total to a value metric once a day, and put the Value alert on that.
Not sure which kind your metric is? See count vs value metrics.
A good starting set
- Signups: Records, 1 day
- Paid orders or new subscriptions: Records, sized to your traffic
- Every scheduled job: Records, about twice its interval
- Response time: Value, average greater than your limit during the last 1 hour
Four alerts like these catch most silent failures in a small product. For cron jobs specifically, see cron job monitoring without the PagerDuty bill.