Martin Pala wrote:

I think that monit mysql protocol test should detect this, for example:

Hi Martin,

I think the following configuration is what you mean, but it does not work:
--8<--
check process mysql with pidfile /var/lib/mysql/iifwpdata.com.pid
start program = "/usr/bin/safe_mysqld --user=mysql"
stop program = "/usr/bin/mysqladmin -pyogiism -u root shutdown"
if failed unixsocket /var/lib/mysql/mysql.sock protocol mysql then exec "/root/bin/force-mysql-restart.sh"
--8<--

I tested this by running a PHP script which maxes out the connections and thus makes it impossible to connect to the mysql server (except on the command line as mysql root). Then run "monit" to awaken monit daemon. The monit log reports the following for that run of monit:

[CST Dec 20 16:52:16] debug    : 'mysql' zombie check passed [status_flag=0000]
[CST Dec 20 16:52:16] debug    : 'mysql' PID has not changed since last cycle
[CST Dec 20 16:52:16] debug    : 'mysql' PPID has not changed since last cycle
[CST Dec 20 16:52:16] debug    : 'mysql' succeeded connecting to 
UNIX[/var/lib/mysql/mysql.sock] via TCP
[CST Dec 20 16:52:16] debug    : 'mysql' succeeded testing protocol [MYSQL] at 
UNIX[/var/lib/mysql/mysql.sock] via TCP

Looks like that syntax for some reason doesn't detect that there are no available connections. Am I using the wrong config?

Thanks,
Allen

--
===========================================================
Allen Shaw                        [EMAIL PROTECTED]
UPF Data Services                              914.826.4622
                            http://www.peacefederation.org



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

Reply via email to