ElastAlert:对同一规则文件

时间:2017-04-18 12:49:10

标签: elastalert

我创建了2个单独的规则文件,如下: -

realert:
分钟:5
from_addr:test@email.com
es_host:xx.xx.xxx.xx
index:topbeat- *
smtp_host:ismtp.corp.company.com
类型:频率
es_port:9200
过滤:
- 范围:
mem.used_p:
来自:0.70
至:1.0
- 长期:
beat.hostname:xxxxx
时限:
分钟:30
警告:电子邮件
名称:9__server__xxxxx__mem.used_p__0.70__30
电子邮件:[“user@email.com”]
num_events:1

realert:
分钟:5
from_addr:test@email.com
es_host:xx.xx.xxx.xx
index:packetbeat- *
smtp_host:ismtp.corp.company.com
类型:频率
es_port:9200
过滤:
- 长期:
http.code:404
- 长期:
beat.hostname:yyyyy
时限:
分钟:30
警告:电子邮件
姓名:25__app__yyyyy__http.code__404__1__30
电子邮件:[“user@email.com”]
num_events:1

两个规则文件都按照其定义生成电子邮件。

有没有办法将这两个规则文件作为单个规则文件。 我可能需要定义的地方,索引:topbeat-,packetbeat- 然后在这种情况下我需要如何编写过滤器,以便针对服务器xxxxx的topbeat- *查询mem.used_p,并针对服务器yyyyy查询针对packetbeat- *的http.code。 ???

0 个答案:

没有答案