我在Ubuntu14.04上安装了带有MariaDB的LEMP。我已经安装并配置了Monit来监视php、mysqld和nginx,但是这些服务中的任何一个似乎都被监视,如下面的屏幕截图所示:

对于我希望在/etc/moninit/conf.d/中监视的每个服务,我都有配置文件,使用以下行,目录正确地包含在/etc/monit/monit中:
include /etc/monit/conf.d/*下面是Mysql的配置文件内容
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group database
group mysql
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host localhost port 3306 protocol mysql with timeout 15 seconds for 3 times within 4 cycles then restart
if failed unixsocket /var/run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout
depend mysql_bin
depend mysql_rc
check file mysql_bin with path /usr/sbin/mysqld
group mysql
include /etc/monit/templates/rootbin
check file mysql_rc with path /etc/init.d/mysql
group mysql
include /etc/monit/templates/rootbin发布于 2016-06-03 06:57:05
最后我自己解决了。由于某种原因:
sudo monit monitor all 解决了问题。
https://serverfault.com/questions/780611
复制相似问题