SpunkArt
Websites, APIs and search

How uptime monitoring works and what the percentages mean

An uptime monitor is a machine somewhere else that asks your site “are you there?” on a schedule and alerts you when the answer is no. The idea is simple; choosing what to check and how to read the numbers takes more care.

What a check actually does

Each check sends a request to a URL and judges the response. A basic check passes when it gets any 2xx status within a time limit. Better checks also confirm that a known word appears in the page, so a blank page or an error page that returns 200 still counts as down. Checks run from outside your network, ideally from more than one region, so a local network fault does not trigger a false alarm.

Turning a percentage into minutes

allowed downtime = (100 − uptime %) ÷ 100 × period length

The table uses a 365-day year, a 30-day month and a 7-day week. Figures are rounded.

UptimePer weekPer 30 daysPer year
99%100.8 minutes432 minutes (7.2 hours)87.6 hours
99.5%50.4 minutes216 minutes (3.6 hours)43.8 hours
99.9%10.1 minutes43.2 minutes8.76 hours
99.95%5.0 minutes21.6 minutes4.38 hours
99.99%1.0 minute4.3 minutesabout 53 minutes

Worked example. For 99.9% over 30 days: 0.1 ÷ 100 = 0.001. A 30-day month has 30 × 24 × 60 = 43,200 minutes. 43,200 × 0.001 = 43.2 minutes of allowed downtime.

Check interval limits what you can see

A monitor that checks every 5 minutes runs 288 checks a day. An outage of two minutes can fall between two checks and never show up. A one-minute interval runs 1,440 checks a day and catches more, at the cost of more requests to your server. Pick the interval from how quickly you would act on an alert.

Doing it yourself with cron

On any always-on Linux machine that is not the server you are watching, a single cron line can do a basic check:

*/5 * * * * curl -fsS -o /dev/null --max-time 10 example.com/health || echo "site down" | mail -s "Alert" you@example.com

-f makes curl fail on 4xx and 5xx statuses, --max-time caps the wait, and the part after || runs only on failure. Replace the mail command with whatever alert channel you use.

What to monitor

  • The home page and one deep page that touches your database.
  • A dedicated /health endpoint that checks dependencies and returns a short response.
  • Your TLS certificate expiry date, which causes total outages when forgotten.
  • Domain renewal date. A lapsed domain takes every page down at once.

Common mistakes

  • Monitoring from the same server you are monitoring. If it dies, so does the alert.
  • Alerting on a single failed check. Require two or three in a row to cut false alarms.
  • Sending alerts to an inbox nobody reads.

Questions

Does planned maintenance count as downtime?

For your users it does. Many service agreements exclude announced maintenance from the figure, so read the definition before comparing numbers.

Why no live monitor on this page?

A monitor has to run continuously from a server. A web page only runs while it is open in your browser, so it cannot watch a site for you.