Health Checks That Mean Something
"The server answers" is not the same as "the site works". How this site's health check picks pages, judges answers and keeps a history worth reading.
Uptime is not correctness
The simplest health check asks one address whether the server is alive. It is better than nothing, and it misses almost everything that actually goes wrong: one section broken, a template error on deep pages, a page that loads in nine seconds. A useful health check looks at the site the way visitors do.
What each run opens
This site's health check opens up to 70 pages per run, chosen in layers:
- core pages: the home page, the readable sitemap,
sitemap.xmlandrobots.txt; - every section's index page, worked out from the sitemap, so a new section is checked without anyone adding it;
- the pages people actually read: the 15 most-viewed pages from analytics;
- one deep page per section, chosen in rotation, so that over a day hundreds of different pages get a turn.
The page list comes from the live sitemap. That has a useful side effect: a page missing from the sitemap is also missing from monitoring, which is one more reason to keep the sitemap generated from the content rather than written by hand.
How a result is judged
| Answer | Verdict |
|---|---|
| No answer, or a 5xx server error | Fail |
| Other 4xx errors | Fail |
| 404 on a section index or a most-read page | Warning: probably withdrawn on purpose |
| 404 on any other page | Fail |
| Success, but slower than 1.5 seconds | Warning: slow |
| Success, fast | OK |
The 404 rule came from experience. A popular page that was deliberately withdrawn kept showing up as an outage. Now a withdrawn page is marked Gone, stays out of the uptime figure and out of the list of blockers, while a real outage on the same page still counts.
Never check private pages
An early version picked a few private admin pages from the list. They correctly refused the anonymous checker, and the dashboard filled with false Blockers. Private paths are now excluded by rule, and a test makes sure they stay excluded. A check that cries wolf trains you to ignore it.
Headers, too
Each run also records security headers on the pages it opens (HSTS, content-security policy and others), so a change that drops one shows up in the same place as a broken page.
Who starts it
Cloud Scheduler calls a protected address on the site on a schedule, with a secret header. A run can also be started by hand from Ravi OS. If a scheduled run fails, the job reports failure back to the scheduler, so the scheduler's own history shows it.
History, not just a snapshot
Results are saved to Firestore, one document per day, with up to 48 runs a day and 180 days kept. From that history the dashboard works out:
- blockers: pages failing now;
- slowing: pages whose response time is rising;
- uptime: the share of checks that succeeded;
- performers and pages that got faster after a change.
One failed check is noise; the same page failing for three runs is a problem. History is what lets you tell them apart.
Try it yourself
Write down the three pages whose failure would hurt you most. Is each one checked automatically today? If your health check only asks the home page, add the rest, then add one rotating deep page per section.