i have 2 servers i want to keep forwarding traffic to server1 & in this case ASM should be disabled
once server1 is down , i want to forward to server2 & enabel ASM checking
if server1 is online again , i should forward to it & disable ASM as it was initially
Created VS , Created two pools , each with one pool member under it Below Irule is now working ,
once ASM is enabled ON VS it is always enabled & never goes disabled again when serevr1 comes back online
when HTTP_REQUEST
{
Check Pool-1 status , if Up forward to it & make sure ASM is disabled
Otherwsie Forward to Pool-2 & enable ASM
if { [active_members Pool-1] >= 1 } {
pool Pool-1
ASM::disable
} elseif {[active_members Pool-2] >= 1 } {
pool Pool-2
ASM::enable policy-name
}
}