Forum Discussion

Jeremy_Bridges_'s avatar
Jeremy_Bridges_
Icon for Nimbostratus rankNimbostratus
Aug 21, 2009

Passing Pool Member Port using Custom TCP Monitor

I would like to pass a pool member's port to different port using a custom TCP monitor. Can this be accomplished? See attachment for a better idea of what I want to do.

10 Replies

  • You can do this with alias address and alias service port. Thus you can associate a monitor to a pool member, but the monitor could be monitoring another server. For example let's say you have a pool member 192.168.12.32:80, but it relies on an app component on a server 192.168.1.22:22222 TCP that is not behind the LTM.

     

     

    Then you can set up the alias address as 192.168.1.2 with alias service port 22222. Then you associate the monitor to the pool member. This basically tells the LTM that 192.168.12.32:80 is dependent on the health of 192.168.1.22:22222

     

     

     

    If you want to simply monitor a different port on the same pool member that is not being load balanced then simply leave the alias address to "* All Addresses" and change the Alias port to what you want to monitor. This will then monitor a different port then what you are load balancing.

     

     

     

    Thanks,

     

    CB

     

     

     

  • That's not quite what I was planning on. You are right that I should use the alias port to monitor a different application, but, I want to see if the F5 can send requests to an external monitoring agent. Contained in the call to this external agent would be the application's port. Then the agent could call the actual application that is being load balanced and tell the F5 that it is functioning properly.

     

     

    The main problem is that the applications that are being load balanced don't handle a basic TCP connection very well. As I outlined in another forum post (http://devcentral.f5.com/Default.aspx?tabid=53&forumid=32&postid=61530&view=topic), the application must follow a specific set of steps after a TCP handshake has occurred. If it doesn't, the thread a request is handled on will not be able to receive any calls for a little while after the TCP connection is closed. If the volume is high enough (as it usually is), the finite number of threads that are allowed to handle requests (usually 25) will be used up and the application will refuse all connections.

     

     

    This design flaw makes the application difficult to monitor with the standard F5 TCP monitor. So, we are trying to find some other way to monitor it. Can we send the port to an external agent using a custom TCP monitor? Or would you suggest some other method of monitoring this app?
  • I think it's possible with the external monitor. However, I don't have an application that behaves that way so I can't really give you anything more then what I posted on http://devcentral.f5.com/Default.aspx?tabid=53&forumid=32&postid=61530&view=topic

     

     

    CB

     

  • I ended up using an external monitor for this purpose. I now have a similar question to the first one but for pool names. Is there a way to pass in the pool name of the pool member being monitored? Perhaps as a command line argument (see attachment)?

     

     

    Using a dynamic variable like this will save us a lot of configuration maintainence. For, my script needs to use the pool name for some of the commands it is running.
  • Did you ever find a solution for sending the monitor the pool name, I have a similar situation that would save on a lot of maintenance if we could pass in the pool name.
  • Nope, we never did. We ended up creating a monitor profile for every pool. Very ugly. Hopefully, the F5 folks add this functionality sometime.
  • That seems like a useful feature. If you'd like to see a new feature added to the product, the best way to make the request is to open a case with F5 Support and get a change request number for the request for enhancement. Other people can add their cases to the request to raise the visibility of the RFE.

     

     

    Aaron
  • How would you pass the pool name? Would the monitor pass the pool name of the pool it is associated to? Wouldn't that require unique monitors anyway? Maybe I'm misunderstanding, but I'm having a hard time conceptualizing this.
  • Hey Citizen,

     

     

    I could imagine there being variables for pool and maybe node names that could be configured in the monitor send and/or receive strings or passed to external monitor scripts. Node name seems like it could be quite useful for testing virtual hosted pool members where the web server requires the correct host header in HTTP requests. Assuming you configure node names in the LTM config, you could then use a send string like:

     

     

    GET /monitor.html HTTP/1.1\r\nHost $NODE\r\nConnection: Close

     

     

    Aaron