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
I could see within a specific iRule LB_SELECTED firing following setting a destination pool in HTTP_REQUEST , but then in another lower-priority ( higher numerical value ) iRule , pool is reset to a different destination pool
are you looking at one connection (e.g. same source ip and port)? if yes, can you add oneconnect profile?
configuration without oneconnect
[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 rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]"
}
when HTTP_REQUEST {
pool foo
log local0. "[IP::client_addr]:[TCP::client_port] [HTTP::host][HTTP::uri]"
}
when LB_SELECTED {
log local0. "[IP::client_addr]:[TCP::client_port]"
}
when SERVER_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port]"
}
}
/var/log/ltm
[root@ve11c:Active:In Sync] config tail -f /var/log/ltm
Mar 9 14:07:35 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283
Mar 9 14:07:35 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283 172.28.24.10/
Mar 9 14:07:35 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283
Mar 9 14:07:35 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283
Mar 9 14:07:36 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283 172.28.24.10/
Mar 9 14:07:36 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283 172.28.24.10/
Mar 9 14:07:36 ve11c info tmm1[15262]: Rule /Common/qux : 172.28.24.1:52283 172.28.24.10/
configuration with oneconnect
[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 { }
oneconnect { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 8
}
/var/log/ltm
[root@ve11c:Active:In Sync] config tail -f /var/log/ltm
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284 172.28.24.10/
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284 172.28.24.10/
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284 172.28.24.10/
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284 172.28.24.10/
Mar 9 14:09:33 ve11c info tmm[15262]: Rule /Common/qux : 172.28.24.1:52284
Mar 09, 2015
thanks very much for the info ( as always ) but i'm still not confident in an answer to my question. i'm still not clear on how to ensure that i am logging the final destination pool : i want to log the pool-name when it's no longer possible for any event in any iRule to set the pool. please note that none of my virtual-servers are assigned a OneConnect profile.
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