elasticsearch - ElastAlert 频率规则没有得到任何命中/查找
问题描述
我无法对频率规则产生任何影响。我从 elastalert 获得样板代码并更新了主机、端口、索引和查询。接下来,我在 elasticsearch 中发布了一些数据,以便在 elastalert 查找后发送电子邮件。但是 elastalert 没有找到这些数据。以下是规则文件和弹性搜索数据。
# Elasticsearch host
es_host: localhost
# (Optional)
# Elasticsearch port
es_port: 9200
# (OptionaL) Connect with SSL to Elasticsearch
#use_ssl: True
# (Optional) basic-auth username and password for Elasticsearch
#es_username: someusername
#es_password: somepassword
# (Required)
# Rule name, must be unique
name: Example frequency rule
# (Required)
# Type of alert.
# the frequency rule type alerts when num_events events occur with timeframe time
type: frequency
# (Required)
# Index to search, wildcard supported
index: test
# (Required, frequency specific)
# Alert when this many documents matching the query occur within a timeframe
num_events: 1
# (Required, frequency specific)
# num_events must occur within this amount of time to trigger an alert
timeframe:
hours: 1
# (Required)
# A list of Elasticsearch filters used for find events
# These filters are joined with AND and nested in a filtered query
# For more info: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html
filter:
- term:
name: "aamir"~~
[![Kibana showing required data][2]][2]
[1]: https://i.stack.imgur.com/dRi2Z.png
[2]: https://i.stack.imgur.com/uTjUT.png
解决方案
推荐阅读
- ios - 您好,我正在使用 swift,我正在尝试在选择集合视图单元格时更改集合视图单元格的标签
- javascript - 如果我从 .json 中提取具有自动重定向的 url,如何使输出成为我将被重定向到的页面?- Javascript
- python - 如何使用 cv2 创建一个判断图像是否在另一个图像中的 True 或 False 函数
- azure-devops - 在 Azure YAML 管道的脚本阶段下添加多个命令
- django - 如何使用 django 从我选择的特定数据库表中登录用户
- python - 二维数组的水平和垂直邻居
- java - 如何处理maven内部依赖?
- java - 在每个事务结束时解除对环境的锁定
- html - HTML -webkit-center 问题
- python - 问题 Scaping Instagram Hashtag 帖子使用具有特殊字符的主题标签计数