8 ms·
Monitor your Website’s Uptime with Google Docs
- olegp 13y agoWhy 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 13y agoI'd be interested to know more about what you did with dashboards using Docs.
- olegp 13y agoWe 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 13y agoAny chance you could email me to discuss? My email is in profile. Or PM on twitter if you prefer?
- olegp 13y agoNo email in your profile. Messaged you via Twitter.
- tlongren 13y agoDoesn't pingdom allow only one site on their free plan? One benefit of this method is the ability to monitor all your sites. No, scratch that. You get 10 "checks" with pingdom free.
- veritas20 13y agodetails?
- vault_ 13y agoThis 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?
- cmhamill 13y agoWow. To paraphrase Babbage, I cannot apprehend the confusion of ideas which could lead someone to think this is a good idea.
- bradleyland 13y agoI'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 13y ago"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 13y agoOk, 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 13y agoAhh, this is different. I'll admit to thinking it's strange, but not insane. Sorry for the quick judgment.
- eitally 13y agoFunny you mention this because we use Nagios to monitor the availability of Google apps (Drive & Gmail mostly) and I get a false positive about once a fortnight. It's proven much more helpful to just monitor HN/Reddit or Twitter to figure out when there's an outage.
- Afforess 13y agoThis 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 13y agosomeone already did it, and to himself :D http://www.behind-the-enemy-lines.com/2012/04/google-attack-how-i-self-attacked.html http://www.behind-the-enemy-lines.com/2012/04/google-attack-...
- mVChr 13y agoInteresting 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."
- umami 13y agoIn my experience all HTTP requests made from Google Docs functions and scripts are cached for at least a few minutes. There are workarounds to that but I would guess they do throttling at an IP and domain level as well (being that they know a thing or two about crawling the web).
- dingaling 13y agoThe script http://ctrlq.org/code/19319-website-monitor-script http://ctrlq.org/code/19319-website-monitor-script iterates through the URLs in the spreadsheet and for each invokes https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app https://developers.google.com/apps-script/reference/url-fetc... which can accept parameters for a URL. If those GET requests initiate intensive processes, then there could be a problem.
- tlongren 13y agoI really like this solution. Makes monitoring a BUNCH of sites really, really easy.
- shoobie 13y agoLove it - there is something very nice about having to setup a site monitor in a minute..
- aroch 13y agoYou're checking for a status 200, but what about sites that use 301 redirects or proxies?
- oneeyedpigeon 13y agoIf 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 13y agoIt 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!
- nkoren 13y agoA 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.
- flanbiscuit 13y agofigured something like this would happen. Docs is not meant for this purpose. It's a cool hack and all but I'd expect issues at some point
- eitally 13y agoAppsScript in general should not be used for production purposes, or anything that depends on timely and consistently responses. Even Google will tell you this (and they provide no SLA on AppsScript for enterprise customers, either). That said, it's still a lot of fun to play with, and there are all sorts of useful things you can do with scripts anyway.
- vidyesh 13y agoIt still annoys me, so I created a filter and it fills up that label now. No more inbox annoyance atleast.
- rorrr2 13y agoBut then you have to check that label manually. You might as well just check the website.
- JacobJans 13y agoI 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.
- ljd 13y agoI'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 13y agoI'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 13y agoI 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)
- petenixey 13y agoI'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.
- uladzislau 13y agoI 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 13y ago+1 for Uptimerobot. I've used it for 2 years or so now and it works great.
- HugoDias 13y agoYou're asking for a lot of permissions, huh? ... Why you need to Manage my calendar ?
- aroch 13y agoI 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
- zschoche 13y agoWhy exactly does need this app access to all my data at google? Scary
- toddmorey 13y agoInteresting 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.
- genericacct 13y agoI'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)
- jsloat 13y agoNoon 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?
- geerlingguy 13y agoI 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 13y agoI 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.
- icoder 13y agoI was held back by the amount of permissions it requires
- lazylizard 13y agoum. 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?