Forum Discussion
Yugandhar
Nimbostratus
Oct 16, 2018iRule to Log all the HTTP Requests.
Hi,
Can we log each HTTP request (GET / POST) coming to a VS i.e. when a client connects to a virtual server on port 80 then can we add a log entry for every HTTP request from that connection or...
Andy_McGrath
Cumulonimbus
Oct 17, 2018You should to log to a facility and a log level using
log local0. ( see iRule wiki log reference) also your reference for the Virtual Server address is wrong and pointing to an invalid variable name $vip where you set $VS.
This should work for you:
when HTTP_REQUEST {
set vip [IP::local_addr]
set uri [HTTP::uri]
log local0.info "Client [IP::client_addr]:[TCP::client_port] connected to VS ($vip)for URI $uri"
}
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
