Forum Discussion
Tracy_Butler_90
Nimbostratus
Jul 06, 2006writing an irule to log all traffic
Need assistance with writing an irule to log all traffic flow. Support suggested that this should be done versus making changes to the syslog-ng file. I've tried making changes to syslog-ng file wit...
nitass
Employee
Oct 19, 2011this is time. can you double check square bracket of HTTP::host? i think your irule is correct.
when HTTP_REQUEST {
set flag 0
if {[HTTP::host] eq "172.28.17.33"} {
set flag 1
set http_request_time [clock clicks -milliseconds]
set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
}
}
when HTTP_RESPONSE {
if {$flag} {
log local0. "$LogString (response) - pool info: [LB::server] - status: [HTTP::status] (request/response delta: [expr [clock clicks -milliseconds] - $http_request_time]ms)"
}
}
Oct 19 21:15:07 local/tmm info tmm[4601]: Rule myrule : Client 192.168.206.102:65430 -> 172.28.17.33/ (response) - pool info: foo 10.10.70.110 80 - status: 200 (request/response delta: 3ms)
Oct 19 21:15:07 local/tmm info tmm[4601]: Rule myrule : Client 192.168.206.102:65430 -> 172.28.17.33/dog.gif (response) - pool info: foo 10.10.70.110 80 - status: 200 (request/response delta: 1ms)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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