Forum Discussion

Josh_Hill_17083's avatar
Josh_Hill_17083
Icon for Nimbostratus rankNimbostratus
Apr 08, 2010

Help with I-Rule to log keywords from URI to external File

Hi Everyone,

 

 

I just need some help with a request I have received. My client would to log of keywords from the entered URI to a file. Example of what has been requested:

 

 

www.xyz.com/mary/index.html

 

www.xyz.com/bob/index.html

 

 

I would like to be able to log the instance of when URI containing "mary" or "bob" has been used, and pass that as an entry to a text file in a csv format with a timestamp.

 

 

I am pretty sure I can match the keywords on the URI with regex or something, but am not sure where to start with the writing of the instance to a file in a csv format.

 

 

Thanks in advance for your help

 

 

coco

 

 

 

  • Hi Josh,

     

    I believe you can do this with a combination of log commands and syslog-ng (http://devcentral.f5.com/wiki/default.aspx/iRules/log.html). However, you will need to extra scripting to format the text file into something close to a CSV file.

     

     

    Bhattman