How can I get alerts when my site is down?
Solution 1
If you need an alert when your site goes down you should consider an online service for notifications: They will see the outside perspective.
If you monitor from "inside your own box" you will never get an email if it crashes completely or looses its network connectivity because your script will not be able to run or alert you anymore.
Bello or Pingdom both offer free accounts that are great to get you started.
More services are listed in Can anyone recommend a website monitoring service?
Solution 2
I'm surprised nobody's mentioned Nagios. It's incredibly powerful, does uptime percentages, notification via email/IM, can run scripts on downtime, etc. It's probably the best out there.
Solution 3
Check out AreMySitesUp (http://aremysitesup.com) and Pingdom. Both have free options, and will send an email and SMS when your site is down. AreMySitesUp has an iPhone app as well.
Solution 4
you can use God : god (dot) rubyforge [dot] org
do you have a server in another location where you could run scripts?
these guys will monitor your page (max 2 urls) for free (every 30 minutes) http host-tracker.com order-page
Solution 5
Nagios is great if you have a large amount of servers. I suggest starting with munin it is simple to setup and plugins are literally a 5 minute time investment. It is great for collecting statistics and alerting on a smaller scale than nagios. The best part is should you expand to be large enough to warrant the investment nagios requires, it integrates into nagios well.
Munin: http://munin.projects.linpro.no/
Development started picking up again also!!
Related videos on Youtube
Sean Clark Hess
Updated on September 17, 2022Comments
-
Sean Clark Hess almost 2 years
My blog is a custom ruby/rack application, and has been crashing randomly every couple of weeks. I sometimes don't notice for days, and I'd like to be notified immediately if it happens.
What's the best way to do it? I'm running Centos 5.3, Nginx, Passenger, Rack, etc.
I've considered figuring out some way to email myself the tail of my error log, as that would help me catch EVERYTHING, not just that one app (it would tell me of missing links, etc). Is there an easy way to do that?
Thanks!
-
Sean Clark Hess over 14 yearsI'll check out God. I don't really want to shell out for another VPS, but my server itself isn't crashing, just nginx. Thanks!
-
Sean Clark Hess over 14 yearsYeah, cool... Am I correct in assuming that most people would use something more robust for "real" applications?
-
baumgart over 14 yearsNagios is almost always the answer for monitoring. But for something like this, it might be overkill. Some scripting would probably be simpler.
-
Josh over 14 yearsI don't agree. With recent Virtual Appliances and work by GroundWork, setting up Nagios is pretty easy, and the sooner you set it up, the longer you start collecting data on trends. Also, what about as he grows/wants to monitor more things? Set up Nagios now, be ready to monitor new services at any time in the future.
-
Josh over 14 yearsHere's the link to GroundWork: groundworkopensource.com/community
-
Alex over 14 yearsYeah, this is just a very basic check. If you wanted to do more detailed monitoring and trending of more than just one URL, you would need something like Nagios, OpenNMS or other similar monitoring systems.
-
Sean Clark Hess over 14 yearsBy the time I notice the site is down, it's a pain to find the corresponding entry in my error log. If I get it right away, it will be easier.
-
Sean Clark Hess over 14 yearsAh, yes, this is just what I was looking for. Thanks!
-
John Gardeniers over 14 yearsIs this just a coincidence? Cristian promoting God? :)
-
gregf over 14 years@embwbam God just runs as a daemon. Could even just run it periodically through a cronjob.
-
TomTom about 10 yearsActually it is a terrible answer. The cost - just to check whether a server /website is up - are crazy. This is like recommending someone to open a taxi service when he asks where he can get a car for a ride. Nagios would need a second virtual machine (can not check if the first one hangs) and a log of configuraiton. It is a power tool, but for "is my site up" I would always recommend an external service.