Charlie_s
Aug 10, 2019Nimbostratus
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?