Forum Discussion

Charlie_s's avatar
Charlie_s
Icon for Nimbostratus rankNimbostratus
Aug 10, 2019

Reverse monitoring - ICMP - Using external monitors

Hello,

 

I am trying to figure out the best way to create a health monitor that is an inverse of the ICMP monitor-when ping to an IP fails, I want the pool member to be marked UP. When ping to an IP succeeds, I want the pool member to be marked DOWN.

 

I tried this code, but seems like is not working:

 

#!/bin/sh

ping -c 5 [IP here] > /dev/null && exit || echo "down"

exit $?

 

The monitor gets the status of up no matter what, any idea?

2 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    You're never telling the caller that the poolmember is UP...

     

    https://devcentral.f5.com/s/articles/template-for-external-monitors

     

     

  • See this ->

    https://devcentral.f5.com/s/question/0D51T00006oHJkmSAG/health-monitor-to-mark-pool-member-up-when-a-ping-fails-inverse-ping-health-check