I recently upgraded to 3.2 and am now having a problem monitoring
mysqld. Here is that portion of the conf file:
check mysql with pidfile /usr/local/mysql/var/sun07.pid
timeout(3,3)
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
alert address@hidden on { timeout }
alert address@hidden on { restart }
The pid file exists before I start monit but then it disappears. Here
is what I did for testing:
address@hidden:/# ps -ef |grep mysql
mysql 455 1 0 18:05:55 ? 0:01
/usr/local/mysql/libexec/mysqld
root 23227 19786 0 07:47:11 pts/3 0:00 grep mysql
address@hidden:/# echo 455 > /usr/local/mysql/var/sun07.pid
address@hidden:/# ls -l /usr/local/mysql/var/sun07.pid
-rw-r--r-- 1 root other 4 Aug 22 07:47
/usr/local/mysql/var/sun07.pid
address@hidden:/# /usr/local/bin/monit -d 60
Starting monit daemon
address@hidden:/# tail /var/log/monit
[EDT Aug 22 07:37:20] Starting monit daemon
[EDT Aug 22 07:39:44] Stopping monit HTTP server
[EDT Aug 22 07:39:44] monit daemon with pid [22123] killed
[EDT Aug 22 07:43:28] Starting monit daemon
[EDT Aug 22 07:43:28] start: (mysql) /etc/init.d/mysql
[EDT Aug 22 07:44:28] monit: Warning process 'mysql' was not started
[EDT Aug 22 07:44:29] Stopping monit HTTP server
[EDT Aug 22 07:44:29] monit daemon with pid [23002] killed
[EDT Aug 22 07:47:47] Starting monit daemon
[EDT Aug 22 07:47:47] start: (mysql) /etc/init.d/mysql
[EDT Aug 22 07:48:47] monit: Warning process 'mysql' was not started
address@hidden:/# ls -l /usr/local/mysql/var/sun07.pid
/usr/local/mysql/var/sun07.pid: No such file or directory
Am I missing something? Thanks for any help you can provide.