Forum Discussion

Muthu_435's avatar
Muthu_435
Icon for Nimbostratus rankNimbostratus
Jun 01, 2023

Virtual server traffic logs not coming in F5 or Remote logging

Hello All, 

We have added our Website to F5 in Virtual Server and status is coming as Enabled. When we access the webserver, we are unable to get any Traffic logs in F5 logs and also in Remote Logging server. 

We have also added Request logging profile to our Virtual server. 

Could you plese let us know the configurations to change to get Website traffic logs? Your help will be of great assist to us. 

Thanks 
Muthu 

  • Hi Muthu_435 , 
    From your query , I see you need to log all traffic , which is a bad approach no need for that. 

    You need to log all traffic in troubleshooting by Taking Packet captures / or assigning irule or Local traffic policy to do that. 

    It's applicable yes , but in heavy virtual servers / Websites , you will fill your Log files with un needed info for normal users. 

    But you still can do it. 

    create simple LTM policy and Log ( Client address , Virtual server Local address ) also you can Log almost any information in each request , but this a bad approach and recommended to keep your logfiles for errors / or alarms only. 

    Code
    
    when CLIENT_ACCEPTED {
       set client "[IP::client_addr]:[TCP::client_port]"
          set vip "[IP::local_addr]:[TCP::local_port]"
             set snat "unknown"
                set node "unknown"
                }
       when SERVER_CONNECTED {  
         set snat "[IP::local_addr]:[TCP::local_port]"
          set node "[IP::server_addr]:[TCP::server_port]"
                    }
        when CLIENT_CLOSED {
            log connection info
              log local0.info "Client $client -> VIP: $vip -> SNAT: $snat -> Node: $node"
              }
    

    This is a sample irule for that , I haven't test it but it's logic looks fine.
    but as I said this is a bad approch , use it only for debugging or troubleshooting and disable it in normal scenarios / cases.

     

    I hope this helps you 🙂 

    • Muthu_435's avatar
      Muthu_435
      Icon for Nimbostratus rankNimbostratus

      Hello Mohamed_Ahmed_Kansoh 

      Thanks for your quick response. We are trying it new and Just wanted to confirm which IP address which should be added in Client,server and VIP? 

      We have created a pool with our Website IP and created a Virtual server. Also created a LTM policy and action is set as Log at request time. Please find the attach screenshot for reference. 

      Your help will be of great assist to us. 

      Thanks 
      Muthu Mahadevan