Forum Discussion
abeny_894
Nimbostratus
Dec 03, 2008How to combine two iRules into one?
Dears,
First of all, I would like to say thanks to all of you that I have learned much on iRules in here.
I have a question on how can I combine separate iRules int...
abeny_894
Nimbostratus
Dec 05, 2008Thanks 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
}
}
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
