We are monitoring a java listener say running on port 9000. So far we have set it this way. It just send me the alert when the application is stopped but it never managed to restart it. What must I do to make it restart ? Another thing there was an instance we purposely stopped but never got alerted could it be monit just miss because its was coincident while its was checking and at the same time the programme was stopped.
check process cvs9000 with pidfile /var/run/wrapper.cvs9000.pid # check your app pid
start program = "/usr/local/yajswstable/bat9000/startDaemon.sh"
stop program = "/usr/local/yajswstable/bat9000/stopDaemon.sh"
if failed port 9000 # if you want to check your app that listen on port 9000
then
restart
Frwa.