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 }
You could try custom HTTP(S) monitors on the GTM to monitor each application in the VIP or an iCall script to query the status of the pool on the LTM from the GTM.
You could try custom HTTP(S) monitors on the GTM to monitor each application in the VIP or an iCall script to query the status of the pool on the LTM from the GTM.
agree with @brad parker. iCall is probably the better tool for bringing a virtual server up/down based on pool-statuses. iRules are traffic-driven and event-based, so the vs up/down action can only be performed when the iRule processes traffic. If the virtual server is disabled and GTM never resolves the hostname to the virtual address (because the virtual servers are down), then the iRule will never receive traffic to bring the virtual server back up.
So to keep everyone updated on the solution gone for, As i’m not the strongest scripter in the world, and there is a time requirement around this for implementation.
We have setup some “Dummy” Virtual Servers, with the URI Pools beneath them.
The GTM then monitors these Virtual Servers, and the main service has dependencies on the URI Virtual servers etc etc…