Forum Discussion
Mar 08, 2015
BIG-IP : iRule event appropriate to log final pool destination
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
For a virtual-server assigned a complex stack of iRules, I need to log the final route destination pool ( if any ). So, this would the f...
nitass_89166
Noctilucent
so if inside SERVER_CONNECTED , LB::server gives the destinated server that traffic will definitely will be routed to ? what system var gives the associated pool ?
e.g.
configuration
[root@ve11c:Active:In Sync] config tmsh list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 8
}
[root@ve11c:Active:In Sync] config tmsh list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
[root@ve11c:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
log local0. "\[IP::client_addr\]:\[TCP::client_port\]=[IP::client_addr]:[TCP::client_port] \
\[LB::server pool\]=[LB::server pool] \
\[LB::server addr\]=[LB::server addr]"
}
when HTTP_REQUEST priority 100 {
pool foo
log local0. "pool foo"
}
when HTTP_REQUEST priority 1000 {
log local0. "\[IP::client_addr\]:\[TCP::client_port\]=[IP::client_addr]:[TCP::client_port] \
\[LB::server pool\]=[LB::server pool] \
\[LB::server addr\]=[LB::server addr] \
\[HTTP::host\]\[HTTP::uri\]=[HTTP::host][HTTP::uri]"
}
when LB_SELECTED {
log local0. "\[IP::client_addr\]:\[TCP::client_port\]=[IP::client_addr]:[TCP::client_port] \
\[LB::server pool\]=[LB::server pool] \
\[LB::server addr\]=[LB::server addr]"
}
when SERVER_CONNECTED {
log local0. "\[IP::client_addr\]:\[TCP::client_port\]=[IP::client_addr]:[TCP::client_port] \
\[LB::server pool\]=[LB::server pool] \
\[LB::server addr\]=[LB::server addr] \
\[IP::server_addr\]:\[TCP::server_port\]=[IP::server_addr]:[TCP::server_port]"
}
when HTTP_RESPONSE {
log local0. "\[IP::client_addr\]:\[TCP::client_port\]=[IP::client_addr]:[TCP::client_port] \
\[LB::server pool\]=[LB::server pool] \
\[LB::server addr\]=[LB::server addr] \
\[IP::server_addr\]:\[TCP::server_port\]=[IP::server_addr]:[TCP::server_port] \
\[HTTP::status\]=[HTTP::status]"
}
}
/var/log/ltm
[root@ve11c:Active:In Sync] config tail -f /var/log/ltm
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : [IP::client_addr]:[TCP::client_port]=192.168.206.73:63213 [LB::server pool]= [LB::server addr]=172.28.24.10
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : pool foo
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : [IP::client_addr]:[TCP::client_port]=192.168.206.73:63213 [LB::server pool]=/Common/foo [LB::server addr]= [HTTP::host][HTTP::uri]=172.28.24.10/
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : [IP::client_addr]:[TCP::client_port]=192.168.206.73:63213 [LB::server pool]=/Common/foo [LB::server addr]=200.200.200.101
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : [IP::client_addr]:[TCP::client_port]=192.168.206.73:63213 [LB::server pool]=/Common/foo [LB::server addr]=200.200.200.101 [IP::server_addr]:[TCP::server_port]=200.200.200.101:80
Mar 9 13:30:21 ve11c info tmm1[15262]: Rule /Common/qux : [IP::client_addr]:[TCP::client_port]=192.168.206.73:63213 [LB::server pool]=/Common/foo [LB::server addr]=200.200.200.101 [IP::server_addr]:[TCP::server_port]=200.200.200.101:80 [HTTP::status]=200
nitass_89166
Mar 09, 2015Noctilucent
yes
LB_SELECTED is triggered after HTTP_REQUEST, isn't it?
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