Forum Discussion
rsacheen
Nimbostratus
Nov 24, 2017BIG-IP request logging profiles
I want to keep track of all the access from the external I/F so that I am able to identify the access information when the backend pool members are down and take proper action later. To achieve this ...
rsacheen
Nimbostratus
Dec 08, 2017Found my way out with following iRules. Thank you for the answers!
-------------------------------------------------
irule HSL
-------------------------------------------------
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool pool_remote_log_servers]
set static::bigip [info hostname]
}
when HTTP_REQUEST {
set ReqLogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
set virtual [virtual]
set virtual_ip "[IP::local_addr]:[TCP::local_port]"
set http_request_time [clock format [clock seconds] -format "%Y/%m/%d %H:%M:%S"]
set referer [HTTP::header value referer]
HSL::send $hsl "$static::bigip $virtual ($virtual_ip) $ReqLogString (request) - $http_request_time $referer"
}
when HTTP_RESPONSE {
set lb_server "[LB::server addr]:[LB::server port]"
set ResLogString "ServerNode $lb_server -> Client [IP::client_addr]:[TCP::client_port]"
set http_response_time [clock format [clock seconds] -format "%Y/%m/%d %H:%M:%S"]
HSL::send $hsl "$static::bigip $ResLogString HTTP ResCode= [HTTP::status] (response) - $http_response_time"
}
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