Forum Discussion

burkslm_127171's avatar
burkslm_127171
Icon for Nimbostratus rankNimbostratus
Jul 25, 2003

Rules

How do I create a rule to log specific URL requests with the session ID? Please show me an example.

 

 

Thanks,

 

Lisa

1 Reply

  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Hi Lisa,

     

     

    Assuming that you're asking about how to write an iRule to look for a specific URL string in the data payload, and also assuming that the session ID you're referring to can be extracted from the HTTP header information or data, then you can write a simple rule as such:

     

     

    if (http_uri contains "http://www.myserver.com/myApp") {

     

    log [facility.level] "Received uri: " + http_uri + " session id: " + http_header("SESSION_ID")

     

    }

     

     

    where [facility.level] is an optional syslog facility and level such as

     

    local7.info. It will default to local0.info.

     

     

     

    If this is not what you're looking for, then please let us know exactly what you'd like to log, an example of an URL you're keying off, and what session ID you're referring to.

     

     

    Regards,

     

    Loc