dumbconcepts / uptime monitor

Know when your website goes down, for free.

If you run a business, your website going down is the kind of thing you'd rather hear about from an email than from a customer. Companies charge monthly for that email. This does the same job from a Google Sheet: it checks your sites every few minutes, emails you when one stops working (including when its security certificate expires), and emails again when it's back. No account, no card, no subscription. You build it once and it runs.

One script watches every site you list. Five sites or fifty, it's the same setup, and adding another is one more line.

Here's what it looks like running, with sample data.

The status page. A single HTML file you can host anywhere; it reads a JSON feed the script serves.
The Sheet. One row per check in Log; one row per site in State.
LogState
LogState

How it decides to email you

Every few minutes the script loads each site the way a browser would. If a site answers, that's a pass. If it errors, times out, or its security certificate has expired, that's a failure.

One failed check doesn't email anyone; sites hiccup. A second failure queues a confirmation two minutes later, and if that fails too, you get the email. Real outages reach you within a few minutes and momentary blips never do.

If every site fails at the same moment, the problem is almost certainly the checker's own connection, not your sites. You get one email saying so instead of one per site.

fail 1logged, nothing sent
fail 2recheck queued two minutes out
fail 3outage email to that site's list
recovers"back up" email, only if an outage email went out
all failone email to you; per-site alerts held

Build yours

From here on it's yours. List your sites and who should get the email. The script below rewrites itself as you type; then it's one paste into Google and one click.

NameWeb addressWho to email when it's down
minutes
days

Set it up

  1. Make a new Google Sheet.
  2. Extensions → Apps Script. Replace what's in the editor with Code.gs below and save.
  3. Pick setup in the function dropdown and press Run. Google will ask you to allow the script to visit websites, send email as you, and edit this Sheet. Allow it. That creates the tabs and the timer.
  4. Run checkAll once by hand and look at the Log tab.
  5. Optional, for the status page: Deploy → New deployment → Web app, execute as Me, access Anyone. Paste the web app URL into status.html where marked and host that file anywhere.

Code.gs


  

status.html