[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] Error in monit configuration

From: Jan-Henrik Haukeland
Subject: Re: [monit] Error in monit configuration
Date: Mon, 17 Aug 2009 04:57:31 +0200

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

check process mysql with pidfile /var/db/mysql/ if failed port 3306 protocol mysql for 1 cycles then exec "/home/ manager/"

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
 if failed port 3306 protocol mysql then exec "/home/manager/"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]