Tear Down VIP based on pool selection in iRule
Good Afternoon,
I have a bit of a query if this is possible,
We have a Pool Selection based on the part of a URI host,
The VIP that this is tied to is monitored by a GTM, what I want to do is Tear down the VIP service if Pools in the selected class have 0 members available, and subsequently get re-enabled when the Pool member is "fixed"
I cant' work out the best way to do it, I've supplied the rule and class below.
Rule
ltm rule pool_selection_rule { when HTTP_REQUEST { set app_pool [class match -value -- [string tolower [HTTP::uri]] starts_with pool_selection_class] if {$app_pool ne ""} { pool $app_pool } else { return } } }
ltm data-group internal pool_selection_class { records { /URI1 { data URI1_9089_pool1 } /URI2 { data URI2_9090_pool1 } /URI3 { data URI3_9091_pool1 } /URI4 { data URI4_9092_pool1 } /URI5 { data URI5_9093_pool1 } } type string }