Forum Discussion
beefy80
Nimbostratus
12 years agoLogging payload length and part of message
Hello
I am looking into logging a TCP request and response through an iRule. I am happy with performing the logging in an iRule as I have done this before but this is the first time I have trie...
Kevin_Stewart
Employee
12 years agoGiven that you want to see client request and server response sizes, you could do something like this:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set cs_len [TCP::payload length]
set cs_payl [TCP::payload]
TCP::release
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
set ss_len [TCP::payload length]
set ss_payl [TCP::payload]
log local0. "Client side ($cs_len) = $cs_payl, Server side ($ss_len) = $ss_payl"
TCP::release
}
This is logging the entire request and response payloads, so you'd need to customize as required.
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