Forum Discussion
iRule to redirect header to a specific node
Hello,
Can I get the node IP from the pool name and eventually pass them as parameters.
Something like: (but the problem is, it doesn't take tmsh commands)
when HTTP_REQUEST {
if { [HTTP::header exists test]} {
set POOLNAME [LB::server pool]
set NODENAME [HTTP::header value test]
for POOLMEMBER in `tmsh list ltm pool $POOLNAME | grep : | sort | awk '{print $1}'`; do
if { [string tolower $POOLMEMBER] equals [string tolower $NODENAME] } {
pool $POOLNAME member ($(tmsh list ltm node $POOLMEMBER_NAME | grep "address")) 80
break
}
done
}
}
Recent Discussions
Related Content
* 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