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...
Pav_70755
Nimbostratus
Oct 19, 2011I did try a tcpdump but there is too much data ultimatley we just want to find out how long the transfer time to and from this external host is
I modified the rule to this:
when HTTP_REQUEST {
set flag 0
if { [HTTP::host] eq "78.42.24.X" } {
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)"
}
}
and in the ltm file got the following:
Oct 19 14:02:33 sys-bip-01 mcpd[1726]: 01070151:3: Rule [Data_Cookie_Log] error: line 3: [wrong args] [HTTP::host equals "78.42.24.X"] line 12: [use curly braces to avoid double substitution] [[clock clicks -milliseconds]]
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