Forum Discussion
Andy_McGrath
Apr 15, 2016Cumulonimbus
So think you will need something like the following.
Your iRule using [whoami] returns the current user so need to use [hostname], this works on tclsh but not tested this directly on the iRule.
when DNS_REQUEST {
if { ([hostname] contains "dc-gtm01") && ( [active_members www.site1.com_pool1] >= 1) } {
pool www.site1.com_pool1
} elseif { [hostname] contains "dc-gtm02") && ( [active_members www.site1.com_pool2] >= 1 } {
pool www.site1.com_pool2
}
}