Forum Discussion

Dixit_18200's avatar
Dixit_18200
Icon for Nimbostratus rankNimbostratus
Apr 26, 2009

How to enable logs for Keep Alive

Hi Guys,

 

 

We are facing some problem with our nodes in pool. We have enabled health monitoras keep alive for html file. That means when ever the load balancer cannot fetch the html file for 5 seconds it will declare that node as node. Is there any way where in i can enable logs for this keep alive so that we will come to know what response we got from server while trying to fetch html file.

9 Replies

  • Hi,

     

     

    The /var/log/ltm file should already show when a health monitor marks a node down. I can't think of a way to log response information that wouldn't involve a storing a large amount of information, which the LTM is not designed to do.

     

     

    Rather than attempting to log additional information and incurring the resource penalties associated with that, I would say the best practice is to design a health monitor that will truly ensure server health, whatever that takes.

     

     

    Denny
  • As Denny says, it would be ideal to set the monitor up correctly. It can help to enable debug on the monitoring daemon, bigd, to do see the request and response send/received for the monitoring. You can enable debug from the command line using 'b db bigd.debug enable' and disable it using 'b db bigd.debug disable' . It does create very large output files (/var/log/bigd.debug). You could also use tcpdump and filter on the non-floating self IP address and the server IP address:port:

     

     

    tcpdump -ni SERVER_VLAN -s0 -w/var/tmp/`/bin/hostname`.monitor.dmp host LTM_STATIC_IP and host SERVER_IP and port SERVER_PORT

     

     

    Aaron
  • Hi Aron/Danny,

     

     

    Thanks for the reply. If i run tcp dump in the background hope that will be sufficient right instead of enabling the log?
  • Yes, tcpdump would show the server response. You can copy the output file from /var/tmp/ to a Windows host and then use Wiresharek to analyze it.

     

     

    Aaron
  • Thanks...but we have put keep alive html as health monitor, but in logs we are seeing node down on port 443 and 80. Do you know what might be the reason?
  • We have eight edge servers that hit our load balancer on port 8080. Is there any way we can filter these 8 edge servers and dump it in to one file?
  • You can capture multiple server IP addresses by adding them to the tcpdump filters:

     

     

    tcpdump -ni SERVER_VLAN -s0 -w/var/tmp/`/bin/hostname`.monitor.dmp "host LTM_STATIC_IP and ((host SERVER_IP1 and port SERVER_PORT1) or (host SERVER_IP2 and port SERVER_PORT2) or (host SERVER_IP3 and port SERVER_PORT3))"

     

     

    Of you could just capture all traffic from the static self IP address and filter the tcpdump once you're analyzing it in Wireshark:

     

     

    tcpdump -ni SERVER_VLAN -s0 -w/var/tmp/`/bin/hostname`.monitor.dmp "host LTM_STATIC_IP"

     

     

    Aaron
  • Hi Aaron,

     

     

    Thanks for the reply. I need to know if we can enable fail over in f5. We have two nodes set up for load balancing and we have enabled keep alive which probes html file every 5 seconds. I need to know if we can write irule to redirect the url if the production load balancer does not get the html file from both the nodes?
  • LTM can check the state of the pool members using a monitor. You could then use a fallback host on the HTTP profile or an iRule which redirects clients when a specific condition is seen (like no pool members available). For details on configuring monitors and the fallback host, try searching on AskF5 for http monitor and/or fallback host. The LTM config guide would be a good place to start. If the existing configuration options don't meet your requirements, you could look at using an iRule.

     

     

    Aaron