[twill] Monitoring Web Applications Behind Load Balancer?

C. Titus Brown ctb at msu.edu
Mon Nov 1 19:25:34 PDT 2010


On Mon, Nov 01, 2010 at 03:19:56PM -0400, Mart Doyle wrote:
> We're been exploring the use of twill to help us monitor web based
> applications and have been making good progress.  We're run into one problem
> which I thought I would bounce off of this group to see if there were any
> "best practices" for dealing with this type of issue.
> 
> We have a small group of our most important applications sitting behind a
> load balancer.  For example, we have a collection of web servers which all
> support an application  called Blackboard.  If I have three of these
> Blackboard servers sitting behind the load balancer, I can create three
> twill scripts which monitor the application on each of these web servers.
> However, I really don't care if one or even two of these web servers are
> down.  As long as one of these web servers is functioning, the application
> is considered to be "up".
> 
> I'd really just like to go to one URL, let the load balancer direct me to
> one of the available application servers, and test to verify that the
> application server is responding to a scripted login request.
> Unfortunately, our twill scripts don't seem to be being redirected to the
> respective application servers so we've been forced to run multiple scripts,
> one for each application server, and need to determine if all three
> application servers are not responding before we flag the application as
> "down".
> 
> How do we do this?  I'd like to be able to test all three, set some type of
> "condition code" for each test, and then only return a failure if all three
> condition codes indicate a failure but it doesn't appear as if twill has the
> ability to compare values, branch, etc.  

So... you have two problems?  Twill isn't doing redirect properly (which
is a bit strange - it should work!), and you want be able to do an 'if'?

You can do the latter in an extension easily enough; see something like
csv_iterate's implementation to get the guts working:

	http://twill.idyll.org/extensions.html	

cheers,
--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the twill mailing list