Forum Discussion

antonio_127066's avatar
antonio_127066
Historic F5 Account
Mar 22, 2010

genelate log

I am making a proposal document APM.

 

Customer wants to log what client do while he access.

 

Format should be "Login name, HTTP method, HTTP content length, HTTP URI"

 

Can we do it by iRule?

 

 

I made it like below, but it doesn't work at all.

 

 

when ACCESS_ACL_ALLOWED {

 

set username [ACCESS::session data get "session.logon.last.username"]

 

log local0. "$username, [HTTP::method], [HTTP::uri], [HTTP::header values Content-Length]"

 

}

 

 

Please somebody help me out.

 

Thank you.

 

 

  • Hello Antonio,

     

     

    the following should work for HTTP basic authentication:

     

     

    when HTTP_REQUEST {

     

    set username [HTTP::username]

     

    log local0. "$username, [HTTP::method], [HTTP::uri], [HTTP::header Content-Length]"

     

    }

     

     

     

    Please note I haven't been able to test it though.