Forum Discussion
Muhammad_Irfan1
Cirrus
Oct 27, 2014Help required to put Logs command in iRule
I have an iRUle which looks like this. I want to log client ip, port number, Server ip, port number and time to log to a remote syslog server lets say ip 10.1.1.1 Can someone please add logs commands in my iRule.
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/300MEFPOSTPAIDLive*" {
pool Tibco-LB-Group3
HTTP::uri [string range [HTTP::uri] [string first "/" [HTTP::uri] 1] end]
}
"/MefVscsLive*" {
pool Tibco-LB-Group4
HTTP::uri [string range [HTTP::uri] [string first "/" [HTTP::uri] 1] end]
}
"/MefAndroidLive*" {
pool Tibco-LB-Group5
HTTP::uri [string range [HTTP::uri] [string first "/" [HTTP::uri] 1] end]
}
"/prx*" {
pool Tibco-LB-Group6
HTTP::uri [string range [HTTP::uri] [string first "/" [HTTP::uri] 1] end]
}
}
}
2 Replies
if you're looking to send the logs off box, you're looking for high speed logging.
https://devcentral.f5.com/articles/irules-high-speed-logging-spray-those-log-statements
Give that a shot. Really give a good breakdown of what's going on.
- I am a network guy, Can you please put HSL log statements in my iRule.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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