[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Monit taking two actions.

From: Stephan Gomes Higuti
Subject: Monit taking two actions.
Date: Wed, 28 May 2014 09:47:30 -0300


I'm trying to set monit to take two actions in failure cases, ex:

 check process PROCESS-MO-c matching "/home/USER/binn/PROCESS -f/home/USER/binn/ --dispatch=MO --daemon"
    start program "/home/USER/binn/PROCESS -f/home/USER/binn/ --dispatch=MO daemon     
    stop program "/bin/bash -c '/bin/kill -9 `/bin/cat /tmp/`'" as uid USER and gid GROUP
    if does not exist then exec "/bin/bash /etc/monit.d/scripts/ proc_mo_c_crit"
    if does not exist for 5 cycles then start 
    else if recovered then exec "/bin/bash /etc/monit.d/scripts/ proc_mo_corp_ok"    
    group gateway

When following the log, I see that if the process stops, monit will detect, and it will start it after 5 cycles, monit also runs the "else" action, however, it does not exec the first action, which is exec "/bin/bash /etc/monit.d/scripts/ proc_mo_c_crit".

Any ideas of what am I doing wrong?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]