Any ideas why monit will not monitor mysql in this setup??? I've gone through everything I can find here to solve the problem to no avail.
These are my versions:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
mysql --version
Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.3
monit -V
This is Monit version 5.6
I've tried both of these setups:
check process mysql with pidfile /var/run/mysqld/mysqld.pid
group database
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
#if failed host 127.0.0.1 port 3306 protocol mysql then restart
if failed unixsocket /var/run/mysqld/mysqld.sock protocol MYSQL then restart
And get this:
monit status
Process 'mysql'
status Not monitored
monitoring status Not monitored
Can confirm:
/var/run/mysqld/mysqld.pid
reads the same as
ps -e | grep "mysql"
Log:
/var/log/monit.log
shows no errors
Monit is running as root:
ps -eaf | grep monit
root 4549 1 0 05:18 ? 00:00:00 /usr/bin/monit -c /etc/monit/monitrc
root 5248 12440 0 05:53 pts/0 00:00:00 grep --color=auto monit