I need "soft" and "hard" stop command.
Hard stop command will be executed only when stop command does not
work for 3 times.
What is the best method to achieve  this?
Will this work?

check process redis with pidfile /usr/local/redis/redis.pid
    start program = "/usr/local/redis/start.sh" with timeout 60 seconds
    stop program  = "/usr/local/redis/stop.sh"
    if failed host localhost port 6379
        send "PING\n"
        expect "PONG"
    then restart
    if 3 restarts within 3 cycles then exec "killall -9 redis"
    if 6 restart within 6 cycles then timeout

maciek

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to