Forum Discussion
abeny_894
Dec 05, 2008Nimbostratus
Thanks a lot Colin. You really help me lots. For real situation, i need check the pool status in every condition, but i found that it seems can't work under "switch -glob", it prompt error " [parse error: PARSE syntax 924 {syntax error in expression " How can I use switch -glob to switch case also monitor the pool status at the same time??
__________________________________________________
when HTTP_REQUEST {
switch -glob {[HTTP::host][HTTP::uri]} {
"test1.f5lab.com*" {
log local0. "hit test1.f5lab.com"
set site a
incr ::total_active_clients_a
log local0. "total requests are $::total_active_clients_a"
set start_time_a $cur_time_a
if { $cur_time_a == $start_time_a } {
if { $::total_active_clients_a <= $::max_active_clients_a } {
pool websrv11_pool
return
}
}
if { $cur_time_a == $start_time_a } {
if { $::total_active_clients_a >= $::max_active_clients_a } {
if { [LB::status pool websrv_REMOTE_pool member 218.189.236.228 80] eq "down"
pool websrv_busypool
return
}
}
}
}