Monit进程'mysql'未被监视

sha*_*one 6 mysql linux ubuntu monit

任何想法为什么monit不会在这个设置中监视mysql ??? 我已经完成了我在这里找到的所有解决问题但无济于事的事情.

这些是我的版本:

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

我尝试了这两种设置:

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

得到这个:

monit status Process 'mysql' status Not monitored monitoring status Not monitored

可以确认:

/var/run/mysqld/mysqld.pid

读取相同

ps -e | grep "mysql"

日志:

/var/log/monit.log

显示没有错误

Monit以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

Ric*_*sek 5

如前所述,这应该做到:

monit monitor mysql
Run Code Online (Sandbox Code Playgroud)

有时,在发生太多重启错误的情况下,“超时”语句可能会禁用监视,我不建议您使用以下语句:

如果X在Y个周期内重新启动,则超时


Per*_*xed 0

听起来 monit 可能无权访问用户数据库组。

读什么ps -eaf | grep mysql