如何解决Elastalert中的多个example_frequency.yaml
我正在研究弹性材料。只要我的条件匹配,我就可以发送电子邮件警报。 现在,我的用例是我想在遇到任何错误时发送电子邮件。
因此,如果出现错误:电子邮件内容正文应为“发生错误” 其他 如果是致命的:电子邮件内容正文应为“致命错误”
我有以下example_frequency.yaml:
name: Error Occurred in your Application
type: frequency
index: logstash-*
num_events: 1
timframe:
hours:1
filter:
-query:
query_string:
query: "message: *ERROR* OR message: *FATAL*"
alert:
- "email"
alert_text_type: "alert_text_only"
alert_text: |
Error occured at {0}
Host Machine id: {1}
Error Message: {2}
Log File Location: {3}
alert_text_args:
- "@timestamp"
- "beat.hostname"
- "message"
- "source"
email:
- "test@gmail.com"
使用这种配置,即使是致命/错误,我也得到相同的电子邮件内容。我想更改一些文本,如果它是致命的。 在ElastAlert中有做任何事情吗? 请帮助大家!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。