我正在测试 elastalert,在假期周末之前的星期三出现了一个奇怪的问题,所以我只是删除了所有警报配置并重新启动了 elastalert,所以它在周末没有警报。现在星期一我重新打开它并查询自星期三以来的所有日志,并且需要很长时间才能赶上。我只想查询最近的数据。这是设定吗?如果需要,如何禁用它?
这是一个示例警报配置:
name: alert-name
type: frequency
num_events: 500
timeframe:
minutes: 60
realert:
minutes: 60
index: index.name-*
filter:
- query:
query_string:
query: "message:\"Message\" AND context.debug.type.something"
alert_subject: "This alert happened"
alert:
- pagerduty:
pagerduty_service_key: "nice_try_fbi"
pagerduty_client_name: "company"
这是我在日志中看到的(今天是 11/26)
INFO:elastalert:Queried rule alert-name from 2018-11-22 12:49 UTC to 2018-11-22 13:04 UTC: 83 / 83 hits
INFO:elastalert:Queried rule alert-name from 2018-11-22 13:04 UTC to 2018-11-22 13:19 UTC: 83 / 83 hits
INFO:elastalert:Queried rule alert-name from 2018-11-22 13:19 UTC to 2018-11-22 13:34 UTC: 89 / 89 hits
INFO:elastalert:Queried rule alert-name from 2018-11-22 13:34 UTC to 2018-11-22 13:49 UTC: 91 / 91 hits
INFO:elastalert:Queried rule alert-name from 2018-11-22 13:49 UTC to 2018-11-22 14:04 UTC: 87 / 87 hits
看看它如何以 15 分钟的增量查询 4 天前的内容?时间范围设置为 60 分钟。我只想查询最近的 60 分钟。我在这里错过了什么吗?