Forum Discussion
uni
Aug 22, 2013Altostratus
I don't know if this is the most elegant solution, but consider something like this.
Instead of 1 pool with priority groups, create two pools, the default pool, and the backup pool, and manage the priority group in an irule. The same irule can be used to determine which pool is in use, and which can be used to supply this info to the GTM via a monitor on the GTM.
The LTM irule would look something like this:
ltm rule my-rule {
when HTTP_REQUEST {
if { [HTTP::uri] eq "/_gtm_monitor" } {
if { [active_members [LB::server pool] ] < 1 } {
HTTP::respond 200 content "default pool down"
} else {
HTTP::respond 200 content "default pool up"
}
} else {
if { [active_members [LB::server pool] ] < 1 } {
pool backup_pool
}
}
}
}
You then create an http monitor on the GTM assigned to the virtual server which requests /_gtm_monitor, and expects "default pool up".