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
-User Name
-Method
-URI Stem
-URI Query
-Protocol Status
-Bytes Sent
-Bytes Received
-Time Taken
-User Agent
-Cookie
-Referrer
I want similar logging in F5
Can these properties be read from https_headers or from some other location and finally logged in a text file?
How to write an i-Rule for logging and also reading and writing into a file?
- hoolio
Cirrostratus
You can use a rule to log information about requests and responses. You can then configure syslog-ng to process the log events to a file or to a remote syslog server. - Shruti_Malik_84
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
By default, events logged to the local0 syslog-ng facility are recorded in the /var/log/ltm log file. - tungsten_112959
Nimbostratus
when CLIENT_ACCEPTED { - hoolio
Cirrostratus
Sorry 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" }
- tungsten_112959
Nimbostratus
millions thanks 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