Would you like to receive instant alerts as soon as your website goes down or is inaccessible to users? Would you like to receive these downtime alerts as an email message or text on your mobile phone or both?
Most website monitoring services follow the “freemium” model – they have free plans for basic downtime & uptime monitoring of a website but need to pay for unlimited email or SMS alerts. You may also need to upgrade to monitor multiple websites. There’s a good alternate though.
Create your own Website Uptime Monitor with Google
You can create your own website monitor that runs on Google servers and sends email alerts or SMS when your website goes down or is up again. It logs everything in a Google Spreadsheet or you can even store the downtime activity inside Google Analytics.
How to Setup Website Monitor
Here’s how you quickly configure Google Docs to monitor the uptime /downtime of your website. This has to be done just once and the spreadsheet will continuously monitor your sites in the background. Let’s get started:
- Click here to copy the website monitoring Google sheet into your Google Drive. You may either use your Gmail or Google Apps account to sign-in.
- Go to the Website Monitor menu (near Help) and choose Configure. You may have to authorize the sheet the first time you configure the monitor.
- Specify your website URL and the email address where you wish to be notified. You can put multiple addresses separated by commas.
- [Optional] Enter the Google Analytics Id (e.g., UA-123456-78) and the site monitor will log downtime / uptime events in your Analytics account.
- You can turn on “Get text messages” to receive download alerts by SMS* on the mobile phone connected to your Google account.
Click the Start button and the Google sheet will start monitoring your website in the background. You can close the sheet.
The uptime and downtime times are logged in theGoogle Spreadsheet so you can use that data to analyze the performance of your web hosting company.
How Website Monitor works with Google Docs
Internally, a Google Script attached to the Google Sheet is doing the monitoring and logging events in Google Sheets and Google Analytics.
The script triggers every few minutes and then tries to fetch your website using URLFetchApp, 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 Sheets
Google Apps Script can send email messages through Gmail but uses a workaround for sending SMS text messages. It creates an event in your default Google Calendar with an SMS reminder – the event is set to expire in 30 seconds and thus you get an instant text alerts on your mobile.
*The SMS option is however only available to Google Apps for Work accounts. If you aren’t getting text alerts on your phone, please ensure that your phone number is associated with Google Calendar as detailed in this tutorial.
The story, How to Monitor your Website’s Uptime with Google Docs, was originally published at Digital Inspiration by Amit Agarwal on 10/08/2016 under Google Analytics, Google Docs, Internet.