configure monit on linux to monitor a process and then reboot
- by Elad Dotan
I would like monit to monitor my service and once it's stopped then I want the computer
to reboot. The process don't have a certain port that I can monitor. This is what I did:
check process chat with pidfile /var/run/chat.pid
start program = "/etc/init.d/chat start"
stop program = "/etc/init.d/chat stop"
if changed ppid then exec /sbin/reboot
I tried all sort of things but it only restart my service.
Any suggestion.