Hello Luca,
I use one script for all.

> And you need to set up two check program if you want to start stop your> 
> service using monit, maybe too machinary.. do you mean that?
But my scripts deal with start/stop/status and restart in general and I
get useful status codes. But you are right (sorry), monit collect the
output from the status check only.

check program Manager with path "/usr/local/etc/monit/scripts/em.sh status"
  start program "/usr/local/etc/monit/scripts/em.sh start" with timeout
240 seconds
  stop program "/usr/local/etc/monit/scripts/em.sh stop" with timeout
300 seconds
  if status > 1 for 3 times within 5 cycles then alert

The output of the status check of my script looks similar to the
start/stop output.

With regards,
Lutz


Reply via email to