Forum Discussion
fkw
Nimbostratus
Oct 06, 2020Logging response data
I already know about HTTP::collect and HTTP:payload. My current iRule looks like this: when HTTP_REQUEST_DATA {
set request_payload [HTTP::payload]
}
when HTTP_RESPONSE_DATA {
set respo...
fkw
Nimbostratus
Oct 29, 2020Thank you for your response.
I modified my iRule but this doesn't work either
when HTTP_REQUEST_DATA {
set request_payload [HTTP::payload]
HTTP::release
}
when HTTP_RESPONSE_DATA {
set response_payload [HTTP::payload]
HTTP::release
}
when HTTP_REQUEST {
set request_payload ""
set response_payload ""
set client_ip [getfield [IP::remote_addr] "%" 1]
set http_method [HTTP::method]
set port [TCP::local_port]
if { $http_method eq "POST" } {
if { [HTTP::header Content-Length] != "" } {
HTTP::collect [HTTP::header Content-Length]
} else {
HTTP::collect 1048576
}
}
}
when HTTP_RESPONSE
{
if { $http_method eq "POST" } {
if { [HTTP::header Content-Length] != "" } {
HTTP::collect [HTTP::header Content-Length]
} else {
HTTP::collect 1048576
}
HSL::send [HSL::open -proto UDP -pool syslog_server] "HSL TEST:\n\nClient: $client_ip\n\nRequest Data: $request_payload\n\nResponse Data: $response_payload"
}
}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