Forum Discussion
kevin_50596
Nimbostratus
Jul 10, 2008Multi-part Irule
Hello, I'm fairly new to writing iRules so I'm not sure exactly how to get this done. Any help would be greatly appreciated.
Here's some data to give you context for what I'm trying to...
hoolio
Cirrostratus
Jul 10, 2008Hi Kevin,
I think this will work for you. If you run into any issues, check /var/log/ltm for debug output. You can add more debug statements to see what's happening. Once you're done testing, you can comment out the log statements to save resources.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: New request to [HTTP::uri]"
Check if URI contains /forms
if {[HTTP::uri] contains "/forms"} {
log local0. "[IP::client_addr]:[TCP::client_port]: active members: [active_members SECOND_POOL]"
Use the second pool if it has available members
if {[active_members SECOND_POOL] > 0}{
pool SECOND_POOL
} else {
Second pool was down, so use the third pool
pool THIRD_POOL
}
}
}
Aaron
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