【问题标题】:ElastAlert and changing E-mail contentElastAlert 和更改电子邮件内容
【发布时间】:2019-09-25 11:17:25
【问题描述】:

我刚刚开始使用 ElastAlert,我喜欢它。我有一个应用程序启动并运行,它基本上会向我发送电子邮件。我现在的问题是电子邮件包含一大堆我想删除的不必要信息。

我环顾四周,但没有找到任何方法。有没有一种简单的方法可以更改电子邮件的内容以使其更简单?比如具体指定我想查看哪些字段。

最好的问候!并提前感谢您。

【问题讨论】:

    标签: elastalert


    【解决方案1】:

    自定义电子邮件内容的示例规则配置部分。

    alert:
    - "email"
    alert_text_type: alert_text_only
    alert_text: "
    Disk Used : {0:.2%}\n
    Mount Point : {1}\n
    Host : {2}\n
    Timestamp : {3}"
    alert_text_args: ["system.filesystem.used.pct","system.filesystem.mount_point","beat.hostname","@timestamp"]
    email:
    - "devops@example.com"
    

    电子邮件内容示例:

     Disk Used : 85.00%
     Mount Point : /
     Host : example_hostname
     Timestamp : 2019-01-14T06:04:46.221Z
    

    Reference

    【讨论】:

      猜你喜欢
      • 2019-06-02
      • 1970-01-01
      • 1970-01-01
      • 2017-06-12
      • 1970-01-01
      • 1970-01-01
      • 2019-07-04
      • 1970-01-01
      • 2019-08-16
      相关资源
      最近更新 更多