Forum Discussion

JP_42120's avatar
JP_42120
Icon for Nimbostratus rankNimbostratus
Nov 09, 2012

HSL -logging various HTTP::Header values

 

Hi, i am trying to capture the "X-Forwarded-For" and other header info in this High Speed Logging iRule but not sure if it's going to work.

 

 

 

when CLIENT_ACCEPTED {

 

set hsl [HSL::open -proto UDP -pool syslog_server_pool] }

 

 

when HTTP_REQUEST {

 

if { [HTTP::header exists "Content-Length"]} {

 

HSL::send $hsl "<190> Virtual: [virtual name], IP: [IP::client_addr], Method: [HTTP::method], XFF: [HTTP::header X-Forwarded-For], Content-Type: [HTTP::header Content-Type], Content-length: [HTTP::header Content-Length] for [HTTP::uri]"

 

}

 

}

 

 

thanks!

 

4 Replies