Forum Discussion

Jon_Macy's avatar
Jon_Macy
Icon for Altostratus rankAltostratus
Feb 09, 2018

Virtual Server IP Address in SERVER_DATA event

We have a straight up load balancing VS for UDP DNS running on an LTM license. To meet some logging and analytic requirements, I want to include the IP address of the VS inside the SERVER_DATA event. According to the documentation, IP::local_addr and IP::server_addr will report the BIGIP source IP or SNAT (depending on configuration). I can't locate a way to reference the VS address...can get it in the CLIENT_DATA event, however the SERVER_DATA event is elusive. Is there a method to get the VS address inside SERVER_DATA? I've examined using a global variable set in CLIENT_DATA event, however that kills CMP and as this is expected to have performance ramifications I'd rather avoid.

 

1 Reply

  • You don't need a global variable to pass the virtual server IP address from the CLIENT_DATA event to the SERVER_DATA event. A local variable will work just fine. For example:

     

    when CLIENT_DATA { set vipAddress [IP::local_addr] }

     

    when SERVER_DATA { log local0. "Client is connected to $vipAddress" }

     

    In other words, set variable vipAddress on the CLIENT_DATA event, and refer to the variable as $vipAddress on the SERVER_DATA event.