Several months ago I was looking into simple (external) website monitoring solutions to monitor my Blue Iris web server and came across a method that uses Google Docs. I've been using it for 3 months now and it's been really reliable. Occasionally I will get a false alert, but once the alert is received, I open the BI app and see if it can connect. If it connects I know it's a false alarm, if not, then it's time to either remotely reboot the computer or figure something else out.
Here is how to do it:
That's it! You will be notified when the script cannot access the web address.
You will notice that Google's bot will be on your login page throughout the day, but it is not attempting to login and I personally have not noticed any increase in CPU usage. You can also edit the script and tweak it to your liking. By default it's set to monitor your website every 5 minutes, but you can change that value within the script. The script uses URLFetchApp.fetch (a Google function similar to wget or curl) and if the HTTP response code is anything other than 200 then it will trigger the alert, indicating there is an issue accessing the site. The uptime and downtime are logged within the same spreadsheet which is convenient so you can see when the script couldn't access the site, then again when the script is able to re-access the site.
If you set up the script to send alerts to your phone # (rather than using your cell providers e-mail address to send the message, such as phonenumber@messaging.sprintpcs.com), then the script sends alerts by creating an event in your Google Calendar but with an SMS reminder. The event is set to expire in 30 seconds alerting your phone instantly. 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. If you do not want to use the calendar method but still want to receive SMS alerts, you can simply use your cell providers e-mail address (mentioned above) and select "NO" for SMS notifications (this is how I am doing it).
Please note that I have a domain name set up for my Blue Iris web server so I have not tried this script using an IP address, but I don't see why it wouldn't work the same. You also must have "Secure Only' selected in 'Blue Iris Options -> Web Server -> Advanced'.
I am also still using Blue Iris Tools locally as a Watchdog that monitors Blue Iris and the Blue Iris web server.
I do not take credit for this script / solution, I am simply sharing it to the community. I found it here - http://www.labnol.org/internet/website-uptime-monitor/21060/
Here is how to do it:
Here’s how you quickly configure Google Docs to monitor the uptime /downtime of your website(s). This has to be done just once and Google Docs will continuously monitor all your sites in the background. Let’s get started:
- Sign-in to your Google account and then click here to copy this Google sheet into your Google Drive. You may use your Google Apps account as well.
- 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 (unless you are using your cell providers e-mail address - ex: phonenumber@messaging.sprintpcs.com).
- 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.
- Go to the Website Monitor menu again and choose “Start Website Monitor” to begin the monitoring process. Close the Google Sheet.
That's it! You will be notified when the script cannot access the web address.
You will notice that Google's bot will be on your login page throughout the day, but it is not attempting to login and I personally have not noticed any increase in CPU usage. You can also edit the script and tweak it to your liking. By default it's set to monitor your website every 5 minutes, but you can change that value within the script. The script uses URLFetchApp.fetch (a Google function similar to wget or curl) and if the HTTP response code is anything other than 200 then it will trigger the alert, indicating there is an issue accessing the site. The uptime and downtime are logged within the same spreadsheet which is convenient so you can see when the script couldn't access the site, then again when the script is able to re-access the site.
If you set up the script to send alerts to your phone # (rather than using your cell providers e-mail address to send the message, such as phonenumber@messaging.sprintpcs.com), then the script sends alerts by creating an event in your Google Calendar but with an SMS reminder. The event is set to expire in 30 seconds alerting your phone instantly. 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. If you do not want to use the calendar method but still want to receive SMS alerts, you can simply use your cell providers e-mail address (mentioned above) and select "NO" for SMS notifications (this is how I am doing it).
Please note that I have a domain name set up for my Blue Iris web server so I have not tried this script using an IP address, but I don't see why it wouldn't work the same. You also must have "Secure Only' selected in 'Blue Iris Options -> Web Server -> Advanced'.
I am also still using Blue Iris Tools locally as a Watchdog that monitors Blue Iris and the Blue Iris web server.
I do not take credit for this script / solution, I am simply sharing it to the community. I found it here - http://www.labnol.org/internet/website-uptime-monitor/21060/