ElastAlert和更改电子邮件内容

问题描述 投票:0回答:1

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

我环顾四周,但没有找到任何方法。有没有一种简单的方法可以更改电子邮件的内容以使其变得更简单?例如准确指定我要查看的字段。

最好的问候!并先谢谢您。

elastalert
1个回答
0
投票

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

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:
- "[email protected]"

电子邮件内容示例:

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

Reference

© www.soinside.com 2019 - 2024. All rights reserved.