首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Monit:编辑内置的警报文本

Monit:编辑内置的警报文本
EN

Server Fault用户
提问于 2022-10-11 02:20:56
回答 1查看 59关注 0票数 0

我在linux上安装了monit工具,它已经监视apache和整个系统几个月了。apache配置文件是:

代码语言:javascript
复制
check process apache with pidfile /var/run/httpd/httpd.pid
      start "/etc/init.d/httpd start"
      stop  "/etc/init.d/httpd stop"
      if memory usage > 70% for 2 cycles then alert
      if memory usage > 90% for 5 cycles then restart
      if cpu > 70% for 2 cycles then alert
      if failed port 80 protocol apache-status
         loglimit > 75%
then restart

今天早上,我收到了一封由monit发送的警告邮件,但是消息描述看起来像我以前从未见过的东西,我想知道在哪里可以找到monit发送这样的警报时使用的默认文本。我收到的警告短信是:

代码语言:javascript
复制
Data access succeeded Service apache 

        Date:        Mon, 10 Oct 2022 12:54:20
        Action:      alert
        Host:        <hostname>
        Description: zombie check succeeded

知道我能在哪里找到并修改上面的“描述”文本吗?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2022-10-11 21:10:58

一个简单的邮件模板是在监视器配置文件中配置的(通常称为monitor in )。

请参阅“设置邮件格式”一节。但是描述或操作文本不能更改,您可以重新排列监视器使用的一些数据。

还可以获得一些其他信息,请参阅https://mmonit.com/monit/documentation/monit.html#Message-format

并列出了一些使用过的文本片段,请参阅https://mmonit.com/monit/documentation/monit.html#Setting-an-event-filter

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1112768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档