首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >monit 任务 monit.d/ 原

monit 任务 monit.d/ 原

作者头像
拓荒者
发布2019-04-23 17:36:12
5150
发布2019-04-23 17:36:12
举报
文章被收录于专栏:运维经验分享运维经验分享

check process nginx with pidfile /run/nginx.pid start program = "/usr/bin/sudo service nginx start" with timeout 30 seconds restart program = "/usr/bin/sudo service nginx restart" if failed port 80  type tcp then alert if failed port 80  type tcp then restart

或者

# 匹配进程名 check process mongo MATCHING mongo # 配置服务启动和重启命令 start program = "/usr/bin/sudo service mongod start" restart program = "/usr/bin/sudo service mongod restart" # 如果端口27017无法访问则认为服务失败,发报警邮件并重启服务 if failed port 27017  type tcp then alert if failed port 27017  type tcp then restart

# 如果在三个周期内重启了3次,则不再监控 # if 3 restarts within 3 cycles then unmonitor

(adsbygoogle = window.adsbygoogle || []).push({});

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档