Forum Discussion
How to enable logs on LTM if http profile is not used
There's a few ways to do this:
-
An iRule - if you want to be very specific about what you log, you can issue an HSL log statement within an iRule. Example:
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool syslog-pool] } when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/app1*" { HSL::send $hsl "<134>User accessing /app1 from [IP::client_addr]" } "/app2*" { HSL::send $hsl "<134>User accessing /app2 from [IP::client_addr]" } } } -
A request logging profile - under Local Traffic - Profiles - Other - Request Logging, create a request logging profile that details what data you want captured and what syslog pool you want it sent to. This is quite a bit more brute force than the iRule approach, so maybe not entirely what you're looking for. Here's some additional information on the request logging profile nonetheless:
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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