Forum Discussion
Techgeeeg_28888
Oct 15, 2014Nimbostratus
Logging the request coming to a Virtual Server
Hi Everyone,
I want to record each and every hit on my Virtual Server. It want the hit log to be sent to my Syslog server. I have configured the Syslog IP under the "Remote Logging" configuratio...
janholtz
Aug 15, 2016Altostratus
Meet the loginator!!!
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool syslog_server_pool]
}
when HTTP_REQUEST {
HSL::send $static::hsl "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
HSL::send $static::hsl "Client: [IP::client_addr]:[TCP::client_port]"
HSL::send $static::hsl "[HTTP::method] [HTTP::uri]"
HSL::send $static::hsl "HTTP \/[HTTP::version]"
foreach aHeader [HTTP::header names] {
HSL::send $static::hsl "$aHeader: [HTTP::header value $aHeader]"
}
if {[HTTP::header exists "Content-Length"] } {
HTTP::collect [HTTP::header "Content-Length"]
} else {
HTTP::collect 1048576
}
}
when HTTP_REQUEST_DATA {
HSL::send $static::hsl "Payload: [HTTP::payload]"
HTTP::release
}
when HTTP_RESPONSE {
HSL::send $static::hsl ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
foreach aHeader [HTTP::header names] {
HSL::send $static::hsl "$aHeader: [HTTP::header value $aHeader]"
}
}
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