Forum Discussion
Nathaneil0227_2
Mar 22, 2016Nimbostratus
iRule for HSL or logging etc
Hi Devcentrallers,
Do you have an iRule that will send logs with timestamp, clientIP, poolmember, vs that also have a condition if fails/success?
Any reply would be appreciated.
Vernon_97235
Historic F5 Account
If this is for HTTP, I recommend using a Request Logging Profile:
If that is not suitable, however:
when LB_SELECTED {
set hsl [HSL::open -publisher your_publisher]
HSL::send $hsl "[clock format [clock seconds]] [IP::client_addr] [LB::server name] [clientside {IP::local_addr}]:[clientside {TCP::local_port}]"
}
If you wish to do this for HTTP, it's prudent to do this instead (if you want to log on each HTTP Request message):
when CLIENT_ACCEPTED {
set hsl [HSL::open -publisher your_publisher]
}
when HTTP_REQUEST {
HSL::send $hsl "[clock format [clock seconds]] [IP::client_addr] [LB::server name] [clientside {IP::local_addr}]:[clientside {TCP::local_port}]"
}
Nath
Mar 24, 2016Cirrostratus
Hi Vernon, Thanks for this but how about for the application that I want to monitor? I mean not http my concern is Ive encountered traffic interuption when I put http profile.
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