Forum Discussion
crosson_16669
Dec 19, 2012Nimbostratus
Confusion on changing a pool member state
I can display states, nodes, and virtual servers just fine. Attached screenshot is my lazy attempt at diving into only the surface of the iControl api. For the most part I found the API docume...
crosson_16669
Dec 19, 2012Nimbostratus
Hmm I couldn't add the screenshot. Here is an example of being able to make calls and pull data off the LTM.
require 'rubygems'
require 'highline/import'
require 'f5-icontrol'
@password = ask("Password: ") {|q| q.echo = false}
@username = "somedude"
@poolname = "tmp_test_pool"
@host = "ltm01.whatever.com"
@ltm = F5::IControl.new(@host, @username, @password, ["LocalLB.PoolMember"]).get_interfaces
while true
string = ""
ltm["LocalLB.PoolMember"].get_monitor_status(poolname).first.each do |member|
status = member.monitor_status
address = member.member.address
port = member.member.port
string << "%s:%d %20s\n" % [address, port, status]
end
system('clear')
puts string
sleep 1
end
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects