Forum Discussion
abachman_72712
Nimbostratus
Aug 11, 2009Setting up Debugging
I would like to incorporate debugging into my following iRule, which I have setup to for the following HTTP_REQUEST to direct traffic by incoming IP address. Traffic being generated is being sent back through the LTM to originator, but if originating member is not available then sends to other member of pool. Traffic that does not match IP will go straight to other pool member.
when CLIENT_ACCEPTED {
set lb_retried 0
}
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
pool soap_pool member 10.10.10.10 9081
} else {
pool soap_pool member 10.10.10.11 9081
}
}
when LB_FAILED {
if {$lb_retried eq 0} {
set lb_retried 1;
if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
pool soap_pool member 10.10.10.10.11 9081
} else {
pool soap_pool member 10.10.10.11 9081
}
} else {
log error?
}
}
1 Reply
- The_Bhattman
Nimbostratus
You can use the command
log local0. "The client [IP::client_addr] didn't make the grade"
However, looking at your code, I think there might be simpler way to detect the LB failure.
What if you change it towhen LB_FAILED { pool soap_pool LB::reselect }
This assumes that the pool has a health check, monitoring each node within the pool. Therefore, it would reselect the the healthiest member in the pool.
I hope that helps
CB
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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