elasticsearch - 使用多个规则启动 ElastAlert
问题描述
我需要使用多个 Yaml 文件启动 Elastalert,而不仅仅是 example_frequency.yaml 就像现在启动 Elastalert 我正在给
python3 -m elastalert.elastalert --verbose --rule example_frequency.yaml
如何使用我添加的所有新规则启动 elast 警报,而不仅仅是 example_frequency.yaml
请帮忙
解决方案
正如@Sourav Atta 提到的,如果你没有通过,--rule xxx.yml
那么它将example_rules
默认加载,否则,你可以在你的config.yaml
文件中添加这样的东西
rules_folder: rules
然后执行elastalert
python -m elastalert.elastalert --verbose --config config.yaml
在这种情况下,elastalert 将加载rules
目录中包含的所有规则,而无需指定特定的--rule
推荐阅读
- c# - 添加记录 nlog 日期获取错误无效月份
- java - 如何使用 Vaadin 的上传方法读取图片?
- python - 我尝试将我的 python 文件转换为 exe 文件,但 exe 文件不会打开
- swift - Swift 如何从我在搜索栏中定义的地图项构建路线
- c# - Unity 3D How to check if a gameobject remained in the same position every x amount of time?
- google-apps-script - Google 表格自定义函数支持多少 JsDoc?
- regex - Perl中输入文件的正则表达式
- r - 如何使用 if 和 else 条件创建新列
- typescript - 如何使用它的声明来定义一个函数?
- mysql - MySQL:char(4) 之间的性能差异比 smallint(5, unisgned) 更快