For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Julio_Navarro's avatar
Julio_Navarro
Icon for Cirrostratus rankCirrostratus
Oct 16, 2015

Dynamic Variable - Node IP - https monitor

Hello;

I am trying to find a way to have the "GET" option have the IP of the node being monitor:

GET /common/access.asp?REFR=https://{$IP}/dummy/site.asp\r\n

{$IP} will be replace by the IP of the node being monitored.

Please advise

Thank you

Julio

1 Reply

  • Two options: 1. Either configure a monitor per pool member/node and assign directly under each pool member (instead of the pool) 2. Configure an external monitor, the following external monitor script should work for you.

     

    !/bin/sh
    
     This removes the IPv6/IPv4 compatibility prefix.  This has to be done because the LTM passes addresses in IPv6 format.
    IP=`echo ${1} | sed 's/::ffff://'`
    PORT=${2}
    PIDFILE="/var/run/`basename ${0}`.${IP}_${PORT}.pid"
    
     This will kill off the last instance of this monitor if it is hung and logs current PID
    if [ -f $PIDFILE ]
    then
    kill -9 `cat $PIDFILE` > /dev/null 2>&1
    fi
    echo "$$" > $PIDFILE
    
     This is the meat of the code, it is responsible for sending the request & checking for the expected response.
    curl -fNs -k -v http://${IP}:${PORT}/common/access.asp?REFR=https://{$IP}/dummy/site.asp -H "Host: ${host}" | grep -i "${rstring}" 2>&1 > /dev/null
    
     This part of the code will mark the node UP if the expected response was received.
    if [ $? -eq 0 ]
    then
    echo "UP"
    fi
    rm -f $PIDFILE
    exit