Forum Discussion

omega7_69107's avatar
omega7_69107
Icon for Nimbostratus rankNimbostratus
Jun 22, 2007

Logging Connections

Is it possible to turn on a level of logging in the GUI that will log connections and which node they get load balanced to, or does that have to be done through an irule?

3 Replies

  • Not sure in LTM, but I'd guess no. Yes in GTM, though:

     

     

    bigpipe db GTM.QueryLogging enable

     

     

     

     

  • You would indeed need to use a rule to log client connections through a virtual server and which node the request was sent to. Here is an example:

    
    when CLIENT_ACCEPTED {
       log local0. "client: [IP::remote_addr]:[TCP::remote_port] -> dest: [IP::local_addr]:[TCP::local_port]"
    }
    when SERVER_CONNECTED {
       log local0. "client: [IP::local_addr]:[TCP::local_port] -> dest: [IP::remote_addr]:[TCP::remote_port]"
    }

    You could combine this into one log statement using this:

    when SERVER_CONNECTED {

    log local0. "client: [IP::client_addr]:[TCP::client_port] -> dest: [IP::remote_addr]:[TCP::remote_port]"

    }

    The output of logging to local0.* is /var/log/ltm.

    Aaron
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Just be careful of exceeding the capacity of /var with excessive logging, though...

     

     

    You might want to check out hoolio's codeshare contribution about custom syslogging (Click here) and filter the messages resulting from your iRule off to a remote syslog server.

     

     

    /d