Saturday, December 24, 2016

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:
  1. 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.
  2. 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.
  3. Specify your website URL and the email address where you wish to be notified. You can put multiple addresses separated by commas.
  4. [Optional] Enter the Google Analytics Id (e.g., UA-123456-78) and the site monitor will log downtime / uptime events in  your Analytics account.
  5. 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.

No comments:

Post a Comment