From: Kyle Schmitt Date: 2009-07-24T03:44:40+09:00 Subject: Re: Watching a website for periodic outages On Thu, Jul 23, 2009 at 12:52 PM, Glen Holcomb wrote: > I'm needing to monitor a web application for periodic outages and log the > duration. > > I originally tried this with SafariWatir as the login is javascript so I > can't use Mechanize.  However Watir seems to give up if the page takes Other than using a monitoring package like Zenoss or Natgios like Kyle said? Sure, you could use the ruby HTTP classes. http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html Read the examples, they will prettymuch show you exactly what you need to do to get a page. The read more to learn how to set your timeout, etc. Put it in a loop, catch the exceptions, toss it in a log file with stuff like log4r, or just plain old file output. Enjoy! --Kyle