1

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

realert:
  minutes: 5
from_addr: test@email.com
es_host: xx.xx.xxx.xx
index: topbeat-*
smtp_host: ismtp.corp.company.com
type :频率
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
索引: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

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

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

4

0 回答 0