Forum Discussion
rongriffin_2708
Nimbostratus
Mar 28, 2017Get current default pool name in an iRule?
Is it possible to query the current value of the default pool on a virtual server in an iRule so that it can be compared to the connection's [LB::server pool] value?
Thanks.
EDIT
Thanks for...
oscarnet_69487
Nimbostratus
Mar 29, 2017HI
you can try this
code
when CLIENT_ACCEPTED {
Save the name of the VIP's default pool
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] contains "/123/") } {
pool POOL_A
}
elseif {([string tolower [HTTP::uri]] contains "/456/") } {
pool POOL_B
}
else {
pool $default_pool
}
}have a good day!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
