Forum Discussion
Shruti_Malik_84
Nimbostratus
Apr 10, 2007Need an i-Rule for logging purposes
Can we make an i-Rule for logging the following details?
The following properties can be logged and their format can be configured in IIS.
-Date
-Time
-Client IP Address
...
hoolio
Cirrostratus
Apr 25, 2007Sorry about that. I had changed the example so that the node IP address and port were saved to $node. You can remove the $nodePort variable from the log statement. I updated the other thread with this:
when HTTP_REQUEST {
set the URL here, log it on the response
set url [HTTP::header Host][HTTP::uri]
set vip [IP::local_addr]:[TCP::local_port]
}
when HTTP_RESPONSE {
set client [IP::client_addr]:[TCP::client_port]
set node [IP::server_addr]:[TCP::server_port]
set nodeResp [HTTP::status]
log connection info
log local0.info "Client: $client -> VIP:$vip$url -> Node: $node with response $nodeResp"
}Aaron
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
