Forum Discussion
Shruti_Malik_84
Nimbostratus
May 24, 2007Log Bytes Send/Received (WEB TRAFFIC) in F5 via iRules or BIG-IP
Hi All,
Is it possible to log the web traffic for a paricular incoming/outgoing https request i.e.' Bytes Send' and 'Bytes received'. The logging is required to be done by either iRules or BIG-IP
Please let me know if anyone has information on this requirement.
Thanks
Anmol Singh
- Cassalom_58315
Nimbostratus
Hi, - JRahm
Admin
Use HTTP::payload length in both events to log this information, or just log both in the response:when HTTP_REQUEST { set request_length [HTTP::payload length] } when HTTP_RESPONSE { log local0. "Request Size: $request_length, Response Size: [HTTP::payload length]" }
- Shruti_Malik_84
Nimbostratus
- hoolio
Cirrostratus
I think the discrepancy you're seeing is because the HTTP::payload length command is giving the bytes of the payload. It does not include the length of the headers. So you're seeing the length of the request as 0 because there were only headers in the request. - JRahm
Admin
TCP::payload length would include the http headers and the http payload, if applicable. - hoolio
Cirrostratus
Hey Citizen, - JRahm
Admin
Good point. Would doing a string length on HTTP::request work? I'm grasping at straws, here... :-) - If it's HTTP, then you can likely use the Content-Length header that the browser and server send to indicate the total length of the upcoming payload.
when HTTP_REQUEST { set request_length [HTTP::header "Content-Length"] } when HTTP_RESPONSE { log local0. "Request Size: $request_length, Response Size: [HTTP::header Content-Length]" }
- hoolio
Cirrostratus
Yeah, I would think adding the HTTP::request and HTTP::payload would do 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