Forum Discussion
Festus_50639
Nimbostratus
Dec 01, 2008"Select pool based on uri content" iRule doesn't seem to be working
Good morning,
I have an iRule that is designed to select a pool based on a string found in the uri and it doesn't seem to be working. I have a log that collects the uri for reference....
Festus_50639
Nimbostratus
Dec 08, 2008Here is the current final draft on my rule.
I have some logging functions in there to show what's going on until I get final buyoff from the customer.
when HTTP_REQUEST {
pool esb_8981_pool
set front "esb_"
set back "_pool"
set svc_uri [getfield [HTTP::uri] ? 1]
set svc_name [getfield $svc_uri "eProxy/service/" 2]
set svc_pool [concat $front$svc_name$back]
set svc_name_port [findclass $svc_pool $::esb_svc_name_port_class ":"]
}
when LB_SELECTED {
following log items used for buyoff testing Will be removed once accepted
set PA_status [LB::status pool [LB::server pool] member [LB::server addr] [LB::server port]]
set SVC_status [LB::status pool $svc_pool member [LB::server addr] $svc_name_port]
log local0. "==ESB Tibco: Policy agent server selected is [LB::server addr] and status is $PA_status=="
log local0. "==ESB Tibco: Service agent server selected is [LB::server addr] and status is $SVC_status=="
if { (([LB::status pool [LB::server pool] member [LB::server addr] [LB::server port]] eq "up") and ([LB::status pool $svc_pool member [LB::server addr] $svc_name_port] eq "up")) } {
pool esb_8981_pool [LB::server addr] [LB::server port]
} else {
additional buyoff test logging
log local0. "==PA svc for [LB::server addr] was $PA_status and SVC port was $SVC_status=="
log local0. "==A different server has been selected=="
LB::reselect
}
}
As for adding objects via the command line, I'm trying to script the creation of those objects and individually it is no problem. The problem occurs when I try to pass variables to the bigpipe command. I am looking for the exact error I got, but it essentially said that the bigpipe command does not accept variables.
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