monit 在 centos 7 和debian 8, debian 9下的使用

在老的centos 6 和 debian 7 中,monit 是通过对 pid 的监控来判断程序是否die 或者有问题的, 但是在 centos 7 和 debian 8 和debian 9下,只要service 不是以forking 的形式启动,systemd 就不会让service 创建 pid file,即使你在service 的配置文件中创建了 PidFile 的命令,这个命令是会被忽略的

因为在由systemd 控制的linux 系统中,monit 无法通过pid 的形式来监控程序,在这里我们就需要用到monit 的的match 命令,比如说nginx 来可以match ‘nginx’, 来完成对nginx 的监控

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.