Forum Discussion

A_124585's avatar
A_124585
Icon for Nimbostratus rankNimbostratus
Mar 21, 2014

Variable in custom HTTP monitor

I want to be able to pass the name of the Pool Member being monitored in the HTTP custom monitor.

 

I have to monitor my pool members via a third party. Currently, I have a separate monitor for every single pool member. But this is getting unmanageable.

 

It would be great to just have a single monitor used by all the pool members and use a variable to indicate which one it is being applied to, for example, something like:

 

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

 

A similar question was asked a couple of years ago. The answer was no at that point, however it was thought to be a useful feature. Am keeping my figures crossed this is now possible.

 

3 Replies

  • if you created an external monitor, you could potentially use a tmsh command and slice/dice the pool members to get the desired outcome. Why does each server need it's own unique monitor? That might be the better problem to solve.

     

  • I'm not sure exactly what information you need for each monitor, but if you were able to specify it in the pool member description field, you can then use in your external monitor script a tmsh command to extract out that description for the monitor calls. In the script (standard template):

     Remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
    IP=`echo $1 | sed 's/::ffff://'`
     Save the port for use in the shell command
    PORT=$2
    

    So you could use this $IP:$PORT information with a call to tmsh list ltm pool and pull out the information necessary to make the monitor call itself to test up/down status.