For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Muhammad_Irfan1's avatar
Oct 27, 2014

Help 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.