

Monitor your Website’s Uptime with Google Docs - blueatlas
http://www.labnol.org/internet/website-uptime-monitor/21060/

======
nkoren
A cautionary tale: I was using this script for a while. Then Google Docs had
some sort of freakout, and began sending me hundreds of "your site is down"
emails, even after I tried to terminate the script and even deleted the
document from my Google Drive. A few days later, the script finally terminated
and the messages stopped.

~~~
vidyesh
It still annoys me, so I created a filter and it fills up that label now. No
more inbox annoyance atleast.

------
cmhamill
Wow.

To paraphrase Babbage, I cannot apprehend the confusion of ideas which could
lead someone to think this is a good idea.

~~~
bradleyland
I've been using this for about six months now and it works great. Is there
something bad about this that we should all know?

~~~
cmhamill
"Bad" is probably a strong word. But issues are:

1\. Reliance on Google Docs' uptime. While any monitoring service will in
theory present the same problem, you're putting all your eggs in one basket.

2\. It's just the wrong tool for the job. Install and learn Nagios or Zabbix
or what-have-you. If you're worried about uptime, get a couple VPSes from
different providers and run your monitors from both.

There's nothing utterly horrifying about it technically, but I just can't
imagine how one comes up with this answer to the question of monitoring
services.

~~~
bradleyland
Ok, but as you pointed out, #1 is just as bad as using any other single
provider (which isn't implied or suggested anywhere here). I disagree with #2.
The results are pretty nice, and they're accessible through Google Docs, which
is great for sharing with co-workers who aren't in IT.

For what it's worth, Google Docs isn't our only monitoring system. We use
Munin as our primary monitoring tool, but this is a nice addition to that.

~~~
cmhamill
Ahh, this is different. I'll admit to thinking it's strange, but not insane.
Sorry for the quick judgment.

------
ljd
I've used it and it is pretty mediocre or at times just inaccurate. I get so
many false alerts from Google about the site being down that I've turned it
off.

As another comment puts it, it's just the wrong tool for the job.

~~~
yaph
I've used a modified version of the script for over a year now and was able to
determine unreliable sites with it. Of course there can be temporary server
issues and when you try to access the site it works again.

The script I wrote checks multiple sites in one go and sends one mail per
script execution, if there are errors. I found that more manageable, the code
for it is on GitHub
[https://github.com/yaph/sitemonitor](https://github.com/yaph/sitemonitor)

~~~
Imagenuity
I just set this up. Works great! I recommend you run it once from the Run menu
to make sure you entered a domain name correctly. You can comment out this
line to get an email every time it runs (good for testing):

    
    
        // if (status !== 200)

------
uladzislau
I highly recommend [http://www.uptimerobot.com](http://www.uptimerobot.com)
which is a free tool. You can monitor up to 50 sites with 5 min intervals.
Very useful email notifications specifying how much time your site was
unavailable.

~~~
nacs
+1 for Uptimerobot. I've used it for 2 years or so now and it works great.

------
olegp
Why not just use Pingdom which is designed for that?

One thing Docs is good for though is building custom dashboards on a $0
budget. We've got one at [https://starthq.com](https://starthq.com) that shows
our key metrics and graphs cohorts for the last few weeks.

~~~
brennebeck
I'd be interested to know more about what you did with dashboards using Docs.

~~~
olegp
We created a simple API which gives us data ranges such as

\- /:start/:end - number of users registered within date range

\- /:start/:end/active - number of users registered within date range who were
active within last week

etc. etc.

Then it's pretty straightforward to use ImportData & CONCATENATE, as well as
fill down to create a matrix of cohorts, which can in turn be graphed.

In general it's best to pull in the raw data with ImportData and then
calculate percentages and such in the spreadsheet. The latter are updated when
the cells they reference refresh.

Docs refreshes ImportData sources once every hour, caching them in between, so
the load on the server and DB is minimal and you end up with more or less
current stats.

~~~
brennebeck
Any chance you could email me to discuss? My email is in profile. Or PM on
twitter if you prefer?

~~~
olegp
No email in your profile. Messaged you via Twitter.

------
Afforess
This is awesome, in the sense that I am in awe that google lets you do this.
Could you create a shareable doc to create a google powered DDOS of a site?
Hypothetically, of course.

~~~
cfontes
someone already did it, and to himself :D

[http://www.behind-the-enemy-lines.com/2012/04/google-
attack-...](http://www.behind-the-enemy-lines.com/2012/04/google-attack-how-i-
self-attacked.html)

~~~
mVChr
Interesting read. Also, good on Amazon for the P.S at the end: "Amazon was
nice enough to refund the bandwidth charges [...] as they considered this
activity accidental and not intentional."

------
petenixey
I'm pleased to see people showing off what you can do with Google docs. I
think most people (and even most developers) totally underestimate what's
possible with Google Apps Script.

A great example of what is possible using Spreadsheets to do live dashboards
and analysis of site data. If you use Heroku you can pump data directly from
Heroku Dataclips into a Google spreadsheet using a live CSV URL and then
analyse, munge and display it however you like.

Apps Script can both consume send data to other web services so coupled with
Heroku Dataclips or Chartio.com it's super powerful. It's a great way to skip
a lot of UI work or even for someone with business savvy but no official
programming skill to get directly into their database and spelunk around.

------
vault_
This is pretty cool. The google calendar event to create texts seems like a
hack though (even more-so than the rest of it). Is there any reason this
couldn't just use the SMS gateways that pretty much every carrier offers?

------
geerlingguy
I have tested this in the past, and a few clients on the service I launched
last year ([https://servercheck.in/](https://servercheck.in/)) have also
reported the same: Google Docs is unreliable at best. Besides false positives,
there were at least two or three outages (sometimes for an hour or more)
unreported.

Google Docs is not meant to be a status monitoring tool. Use the right tool
for the job; there are plenty of free and cheap alternatives that do things
much better, are more reliable, and save you setup and maintenance time.

------
mc
I wrote something like this a few months ago.

Depending on Google Spreadsheet for uptime monitoring is nothing more than
just a fun hack. I'm surprised that some people here are taking it so
seriously. If you're using a script like this, then I hope it's just to keep
those single dynos from falling asleep :)

It's also subject to Google Docs availability, my script sometimes fails to
run with only a "We're sorry, a server error occurred. Please wait a bit and
try again." email notification.

------
genericacct
I've hacked something similar with ethercalc (npm install ethercalc) and you
should too because you never know when google will sunset your favorite
feature..

(RIP reader)

------
toddmorey
Interesting spreadsheet hack, but it's just looking for a 200 response. I use
Pingdom, which allows you to look for specific content in the response, even
on the free plan. It's a better guarantee that the page rendered successfully
end-to-end.

------
JacobJans
I would love to use this, but the app wants access to all of my spreadsheets
at any time. It looks like I'll need to set up a dummy Google account first.

It looks really cool.

------
jsloat
Noon question: couldn't you just write a simple script to do the same thing
and set up a cron job on a free hosting service like GApps instead?

------
aroch
You're checking for a status 200, but what about sites that use 301 redirects
or proxies?

~~~
oneeyedpigeon
If you're using it to check _your own_ site, presumably you know what the
target of any 301 is beforehand, and can aim at that URL in the first place.
Even if you're using a proper monitoring system, why force your server to
handle twice the number of requests than it needs to?

~~~
erichurkman
It still blows me away when I go to a root domain and get redirected to
example.com/home or something similar. Or sites that append slashes to all
URLs, but the content links to the slash-less copy, forcing every click to hit
the server twice. Gah!

------
shoobie
Love it - there is something very nice about having to setup a site monitor in
a minute..

------
tlongren
I really like this solution. Makes monitoring a BUNCH of sites really, really
easy.

------
lazylizard
um. i'm curious why using this results in a high false positive rate. google
docs has dodgy connectivity??? would checking if yahoo.com is up first, before
checking each url, reduce the false positives?

------
zschoche
Why exactly does need this app access to all my data at google?

Scary

------
icoder
I was held back by the amount of permissions it requires

------
HugoDias
You're asking for a lot of permissions, huh? ... Why you need to Manage my
calendar ?

~~~
aroch
I assume because, AFAIK, SMS notifications are handled by Google Calendar. So
to give you the warning it makes an event with an SMS reminder that contains
the warning as its topic

