首页 > 解决方案 > 使用多个规则启动 ElastAlert

问题描述

我需要使用多个 Yaml 文件启动 Elastalert,而不仅仅是 example_frequency.yaml 就像现在启动 Elastalert 我正在给

python3 -m elastalert.elastalert --verbose --rule example_frequency.yaml

如何使用我添加的所有新规则启动 elast 警报,而不仅仅是 example_frequency.yaml

请帮忙

标签: elasticsearchamazon-elastic-beanstalkelastic-stackelasticsearch-5elastalert

解决方案


正如@Sourav Atta 提到的,如果你没有通过,--rule xxx.yml那么它将example_rules默认加载,否则,你可以在你的config.yaml文件中添加这样的东西

rules_folder: rules

然后执行elastalert

python -m elastalert.elastalert --verbose --config config.yaml

在这种情况下,elastalert 将加载rules目录中包含的所有规则,而无需指定特定的--rule


推荐阅读