Forum Discussion

ejknight_293275's avatar
ejknight_293275
Icon for Nimbostratus rankNimbostratus
Jun 26, 2018

Marking a pool member down and drain connection by looking for a file

I have a need to set up the following process:

 

1- Have LTM look for a specific file on a server 2- If that file is not present the following should happen- 1. Server be taken out of the rotation

 

2. Connections to said server be drained

 

3. Once connections are drained the server be disabled in the pool.

 

3- Once the system checks again and sees that the file again exists the server is automatically placed back into the pool as active.

 

I have been researching this on DevCentral and have yet to find exactly what I am looking for so I am asking you smart people for some assistance. If anyone has anything close to this let me know.

 

4 Replies

  • Surgeon's avatar
    Surgeon
    Ret. Employee

    what sort of service you are checking? HTTP, FTP etc?

     

  • You are likely looking for the built in LTM SMB monitor.

     

    There are also LTM external monitors in which you can use your own custom scripted tools (curl/ftp/API calls) to verify file existence.

     

    As for the action to take upon the chosen monitors failure - this is handled by the action on down setting on the pool described in the below white paper. I believe the default behavior of none will suit your purposes but take a look:

     

    https://support.f5.com/csp/article/K15095

     

  • Surgeon's avatar
    Surgeon
    Ret. Employee

    You can configure HTTP monitor with receive string similar to GET /path_to_file/file.name\r\n HTTP/1.1\r\nConnection: Close\r\n\r\n

     

    This will force big-ip to download the file. If the file is too big and if download does not finish until timeout, the pool member will go down. On top of that, your network will be loaded

     

    If you need just check if the file exists, you can create external monitor which can do a file listing for you since http by default has not such command.

     

    LTM External Monitors: The Basics