How to Monitor your Website’s Uptime with Google Docs

Do you have a website or a blog? Would you like to receive instant alerts as soon as your site goes down or becomes inaccessible to users? Would you like to receive these downtime alerts as email, text messages on your mobile phone, or both?


Most website owners use “freemium” website monitoring services to track the downtime and uptime of their sites.  These services have free plans but your are often required to upgrade to the premium version for unlimited email or SMS alerts or if you would like to monitor a large number of websites. There’s a free alternative though.

Build your own Website Uptime Monitor

You can use Google Spreadsheets to monitor the status your website(s) and, unlike the commercial services, Google imposes no restrictions. You can track any number of websites and it will send email /text alerts in case of any issues. The website monitor is written with Google Scripts and is absolutely free as well.
Here’s how you quickly configure Google Docs to monitor the uptime /downtime of your website(s). This has to done just once and the spreadsheet will continuously monitor all your sites in the background. Let’s get started:
  1. Sign-in to your Google account and then click here to copy this Google sheet into your Google Drive. You may use Gmail or your Google Apps account to sign-in.
  2. Put your website URLs in cell B2 (comma separated) and your email address in cell B3. If you wish to receive alerts by text messages, put Yes in cell B4.
  3. You’ll find a new Website Monitor menu in your Google Sheets toolbar. Click Initialize and you’ll get a pop-up asking for authorization. Grant the necessary access.
  4. Go to the Website Monitor menu again and choose “Start Website Monitor” to begin the monitoring process. Close the Google Sheet.
That’s it. The Google sheet will monitor your website in the background at 5-minute intervals and will send alerts whenever it has trouble accessing the website. If the issue is resolved, you’ll get another notification saying “all’s well.”
The uptime and downtime times get logged in the same Google Spreadsheet so you can use that data to analyze the performance of your web hosting company.

How Website Monitor works with Google Docs

Internally, there’s a simple Google Script attached to the Google Sheet that does the monitoring.
The script triggers every 5 minutes and then tries to fetch your website using URLFetchApp.fetch, a Google service similar to wget or curl. If the HTTP response code is anything other than 200, it indicates that there’s an issue with your website and an email alert is sent.

Sending SMS Alerts via Google Docs

Google Apps Script can send email messages but the script employs a workaround for sending text messages.

No comments:

Post a Comment