On 15. aug.. 2009, at 18.53, Giuseppe wrote:

check process mysql with pidfile /var/db/mysql/ hostname.domain.local.pid if failed port 3306 protocol mysql for 1 cycles then exec "/home/ manager/monit.sh"

The problem is that if I manually stop mysql to check if monit works well, the script is not executed, and in the log file I find every 5 seconds these 2 lines:

[ Aug 15 18:41:02] error    : 'mysql' process is not running
[ Aug 15 18:41:02] error : monit: Start or stop method not defined -- process mysql

Yes, you need to specify a start and stop command for a check process entry to manage the process.

I don’t want monit to try to restart the process, but only to execute my script, what did I failed in the configuration file?

In this case, use a check host entry instead, for example

check host mysql_localhost with address 127.0.0.1
 if failed port 3306 protocol mysql then exec "/home/manager/monit.sh"




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

Reply via email to