[Issue] Monit don't start my scripts when ping fails!

Issue #981 closed
Former user created an issue

Hi, i'm trying to get working a ip failover with monit but unfortunatelly looks like monit doesn't run the script btw when i run the script myself everything works.

Do you have any idea ?

Perhaps there is my command on monit

check host xxxxxx with address xxxxxx

  if failed ping4 then exec "/bin/bash -c /etc/monit/SecondaryIP.sh"

  else if succeeded then exec "/bin/bash -c /etc/monit/NativeIP.sh"

Comments (3)

  1. Tildeslash repo owner

    Please stop monit and start it in debug mode: “monit -vI”, then attach the log for the ping test.

    Which script is not executed? The SecondaryIP or the NativeIP? Is monit running as root or normal user?

  2. Log in to comment