monit-general
[Top][All Lists]
Advanced

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

Re: Problem to monitor MySQL


From: Mike Jackson
Subject: Re: Problem to monitor MySQL
Date: Mon, 12 Sep 2005 08:06:49 -0700

my configuration :

check process mysqld with pidfile /var/run/mysqld/mysqld.pid
  start program = "/etc/init.d/mysqld start"
  stop program = "/etc/init.d/mysqld stop"
  if failed host 127.0.0.1 port 3306 then restart
  if cpu is greater than 60% for 2 cycles then alert
  if cpu > 80% for 5 cycles then restart
  if children > 100 then restart
  if loadavg(5min) greater than 50 for 8 cycles then restart
  if 3 restarts within 5 cycles then timeout
  alert address@hidden
  group server

Is it possible MySQL isn't listening on port 3306? That would probably mean that skip-networking is set in your my.cnf or on the startup command line. You might want to replace the port 3306 line in your monitrc with:

if failed unixsocket /tmp/mysql.sock proto mysql then restart

Filling in the correct socket path on your system if it's different than /tmp/mysql.sock. I can't remember which version of monit added the mysql protocol test; on the machine I grabbed that config line from, I'm running 4.6 from CVS.




reply via email to

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