Forum Discussion
funkdaddy_31014
Mar 03, 2011Nimbostratus
reference a VIP's default pool within iRule?
I have an iRule that I want to use with different VIPs where each VIP may have a different default pool specified in the VIP configuration.
I'm wondering if I can generically reference the default pool within the iRule, so it will send traffic to different pools depending on which VIP calling the iRule.
I.E.:
when HTTP_REQUEST {
switch -glob [HTTP::path] {
"/abc/proxy.jsp" {
pool default <--the default pool for the VIP to which this iRule is applied
}
"/xyz*" {
pool xyz_pool
}
...
default {
pool def_pool
}
}
}
Thanks,
-Funkdaddy
- hooleylistCirrostratusYou can use [LB::server pool] in CLIENT_ACCEPTED to get the name of the virtual server's default pool before it's change in the iRule:
when CLIENT_ACCEPTED { Save the name of the virtual server's default pool before it's change in this iRule set default_pool [LB::server pool] } when HTTP_REQUEST { switch -glob [HTTP::path] { "/abc/proxy.jsp" { pool $default_pool } "/xyz*" { pool xyz_pool } ... default { pool $default_pool } } }
- funkdaddy_31014NimbostratusPerfect!
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