Forum Discussion
jonathan_b_2522
Nimbostratus
Aug 29, 2017iRule to record GET(response) data size in bytes
We are seeing resources spike due to some web scraping. I created an iRule to log each of the connections, and I've been able to see top talkers by number of connections, but I'm looking for an easy way to see top talkers according to GET size in bytes,kilobytes, etc. Any ideas? Here is my current log iRule.
when HTTP_REQUEST { log local0. "clientIP:[IP::client_addr] accessed [HTTP::host][HTTP::uri]" }
1 Reply
Sort By
- Jad_Tabbara__J1
Cirrostratus
Hello Jonathan,
Try this irule :
when HTTP_REQUEST { set client_ip [IP::client_addr] set host [HTTP::host] set uri [HTTP::uri] } when HTTP_RESPONSE { set content_length [HTTP::header "Content-Length"] log local0. "Request => clientIP:$client_ip accessed $host $uri Response => [HTTP::status] Content-length $content_length bytes" }
Hope it helps
Please give me a feedback
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