amphibian

DESCRIPTION:

Amphibian is a ruby library for accessing and interacting with an Apache mod_proxy_balancer via the web GUI created by the balancer_manager directive.

Amhpbian works by scraping the balancer-manager page, and sending get requests with appropriate query strings to the balancer manager in order to enable and disable hosts.

FEATURES/PROBLEMS:

Allows you to access the different balancers and members on the Apache mod_proxy_balancer balancer-manager handler page.

Also, investigating controlling the load balancer via the web page, but use at your own risk.

SYNOPSIS:

nick-stielaus-computer-3:amphibian nick$ irb
>> require 'amphibian'
=> true
>> a = "http://example.com/balancer-manager"
=> "http://example.com/balancer-manager"
>> amp = Amphibian::BalancerManager.new(a)
>> amp.hosts
=> ["http://127.0.0.1:10000", "http://127.0.0.1:10001", "http://127.0.0.1:10002"]
>> amp.enabled_hosts
=> ["http://127.0.0.1:10001", "http://127.0.0.1:10002"]
>> amp.disabled_hosts
=> ["http://127.0.0.1:10000"]
>> amp.hosts_with_status
=> {"http://127.0.0.1:10000"=>"Dis", "http://127.0.0.1:10001"=>"Ok", "http://127.0.0.1:10002"=>"Ok"}

REQUIREMENTS:

  • Ruby stuff

  • Apache, mod_proxy, mod_proxy_balancer, and an accessible balancer-manager page.

INSTALL:

  • gem install amphibian

LICENSE:

(The MIT License)

Copyright © 2009 Nick Stielau

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.