Forum Discussion
Lee_Sutcliffe
Jun 12, 2019Nacreous
You could customise your health monitor on GTM to mark the server down if it receives a certain response such as "ERROR" or status code of 503. Then Modify your iRule to something like this
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"abc.com" {
if {[active_members INT_RTL_abc_8094_POOL] > 0} {
pool INT_RTL_abc_8094_POOL
} else {
HTTP::respond 503 content "ERROR"
}
}
"def.com " {
if {[active_members INT_RTL_def_9443_POOL] > 0} {
pool INT_RTL_def_9443_POOL
} else {
HTTP::respond 503 content "ERROR"
}
}
}
}