noted.do
The Tech Guy

You Shouldn't Be the Last to Know Your Site Is Down

Here's an uncomfortable truth about running your own websites: if you don't have monitoring, your users are your monitoring. Someone emails you, or posts about it, or just quietly gives up and leaves. By the time you find out, it's been down for hours.

Uptime monitoring fixes that, and it's one of the cheapest bits of peace of mind you can buy. Often it's free.

The basic idea is almost too simple. Some other machine, somewhere that isn't your server, makes a request to your site every minute or few minutes. If it gets a good answer, fine. If it gets an error, a timeout, or nothing at all, it tells you. That "somewhere that isn't your server" part matters. A monitor running on the same box as your site can't tell you the box is down, because it's down too.

The checks come in a few flavors, and it's worth knowing the difference because they catch different problems.

An HTTP check requests a URL and looks at the status code. A 200 means good, a 500 or a timeout means bad. This is the one you want for almost everything. A ping check just asks whether the machine answers on the network at all, which is useful for a router or a server but tells you nothing about whether the website on it works. Your server can be pinging along happily while PHP has crashed and every page is an error. A port check (sometimes called TCP) confirms something is listening on, say, port 443 or your database port. And a keyword check loads the page and looks for a specific bit of text, which catches the sneaky failure where the server returns a 200 but the page is actually a blank white screen or a "database connection failed" message.

If I had to pick one, it'd be the keyword check on a page that touches the database. Something like your homepage or a health endpoint that runs a trivial query. If that text shows up, the web server, the app and the database are all alive.

Some other things worth turning on if your tool supports them:

  • Certificate expiry warnings. Auto-renewal fails more often than people expect, usually silently. A heads-up a couple of weeks before a cert expires saves you from a browser full of scary warnings.
  • Domain expiry warnings. Same idea. Letting a domain lapse by accident is a terrible day.
  • Heartbeat (or "cron") monitors. These flip the direction around. Instead of the monitor checking you, your backup script or scheduled job pings the monitor when it finishes. If the ping doesn't arrive on time, you get alerted. This is the only good way I know to find out that your nightly backup stopped running three weeks ago.

As for tools, honestly most of them are fine. Hosted services like UptimeRobot, Better Stack and Healthchecks.io have free tiers that cover a handful of sites. If you self-host, Uptime Kuma is the popular pick, with a nice dashboard and a long list of notification options. Just remember the rule from earlier: run it on a different machine, ideally a different provider, from the stuff it's watching. A small cheap VPS somewhere else works. So does running a self-hosted monitor and also one free hosted check that watches the monitor itself.

The part people get wrong isn't the checking. It's the alerting. If your phone buzzes every time a check has a one-off hiccup, you'll start ignoring it within a week, and then the real outage gets ignored too. A few settings help a lot. Require two or three failed checks in a row before alerting. Check from more than one location if you can, so a flaky network path somewhere doesn't count as "down." Send alerts somewhere you'll actually see them (a push notification, a chat app) rather than an email folder you check twice a week. And make sure you also get the "it's back up" message, so you're not left wondering.

A public status page is a nice extra if other people depend on your stuff. It answers "is it just me?" without anyone needing to contact you.

My advice: start with one HTTP keyword check per site and one heartbeat for your backups. That's maybe ten minutes of setup. You can get fancy later, but those two alone mean you'll hear about problems before anyone else does.

Comments

Be kind. See the rules.