给squid 添加 monit 自动监控功能

 

advertcn 在国内的电信节点本来是使用的nginx 的,可惜貌似实在有点问题,时断时续,可能是配置有点问题,无奈换回了squid

squid呢,0.1% 的可能性会因为这样或者那样的原因死机,于是就想加上一个monit 做自动监控

首先安装squid,十分的简单,直接yum install squid

其次,编辑/etc/monit.conf, 加入下面的命令

check process squid with pidfile /var/run/squid.pid
start program = “/etc/init.d/squid start”
stop program = “/etc/init.d/squid stop”

 

保存,然后monit -t 检查语法错误,如果没有问题了,就直接service monit start

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.