Forum Discussion

Stefan_Klotz's avatar
Stefan_Klotz
Icon for Cumulonimbus rankCumulonimbus
Sep 17, 2012

Exchange 2010 Autodiscovery external monitor

Hi,

 

we've implemented an Exchange 2010 setup following the F5 deployment guide including all the advanced monitors for the different HTTP-services. We also used the external monitor-script from devcentral for the Autodiscovery monitor and this is also working fine, but it's spaming the log every time it's executed.

 

The reason seems to be related to the following lines of the script:

 

if [ -f $PIDFILE ]

 

then

 

echo "EAV exceeded runtime needed to kill ${NODE}:${PORT}" | logger -p local0.error

 

kill -9 `cat $PIDFILE` > /dev/null 2>&1

 

fi

 

The monitor interval is only set to 60 seconds, which is more than enough for executing the script, but need it to be killed every time?

 

Any ideas or hints for further troubleshooting would be much appreciated (fyi we are running 10.2.4 HF3 on a LTM 3900).

 

 

Ciao Stefan :)

 

2 Replies

  • Still no idea?

     

    In the meanwhile I created another external monitor for secure POP3 and IMAP, where I use the same logic around and there I also get these log entries.

     

    So I'm wondering if there is maybe something "wrong" with the code itself?

     

    Here again how the PIDFILE will be generated:

     

    PIDFILE="/var/run/secure_imap.${NODE}_${PORT}.pid"

     

    And at the end of the script it will be removed:

     

    rm -f $PIDFILE

     

     

    What would be an option is to remove this line:

     

    echo "EAV exceeded runtime needed to kill ${NODE}:${PORT}" | logger -p local0.error

     

    But I would expect, that this event shouldn't be triggered in normal situations.

     

     

    Thank you!

     

     

    Ciao Stefan :)

     

     

  • Hi Stefan,

    There's a "bug" of sorts with many example external monitors. When the script sends anything to STDOUT, bigd marks the monitor as successful and stops its execution. So make sure that the removal of the PIDFILE is done before anything is echoed to STDOUT.

    Here's one method that avoid this situation:

    
    echo "GET /" | /usr/bin/nc $node_ip $2 2> /dev/null | grep -E -i $3 > /dev/null
    
    status=$?
    if [ $status -eq 0 ]
    then
        rm -f $pidfile                            ;    remove the pidfile before the script echoes anything to stdout and is killed by bigd
        echo "up"
    fi
    rm -f $pidfile                            ;    also remove the pidfile before the script ends if $status isn’t 0
    

    This is described in SOL7444:

    sol7444: Requirements for external monitor output

    https://support.f5.com/kb/en-us/solutions/public/7000/400/sol7444.html

    Can you reply with any links where this isn't being done correctly so I can update/request to have them updated? I've done this already for the sample external monitors that are shipped with LTM.

    Thanks, Aaron