问题标签 [elastalert]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
98 浏览

elasticsearch - 从 Kibana Canvas 发送电子邮件

我正在使用免费的 ELK Stack 7.3.2 进行过程监控。使用 Kibana Canvas 可视化我的正常运行时间消息。以下是示例消息:

{"processName":"SM1","processType":"serviceManager","status":"DOWN","update":"2h14m","hostname":"devvm20"}

{"processName":"SM2","processType":"serviceManager","status":"UP","update":"2h14m","hostname":"devvm20"}

processName 是我的唯一键。

如果我的消息在 2 分钟内迟到或慢,我正在寻找一种发送电子邮件的方法。

ELK Stack Watchers 会提供帮助,但它们是 X-Pack 的一部分,也是基于订阅的。

如何改用 ElastAlert?

0 投票
1 回答
181 浏览

devops - 过滤器部分在 elastalert 中无法正常工作,我每分钟都会收到警报

我正在尝试使用 elastalert 设置警报配置。在文件 example_frequency.yaml 我卡在过滤器部分,如果我尝试这个

在那种情况下,它会提醒我匹配每个单词所以我收到了我不想要的警报。我也尝试了查询过滤器,但没有得到解决方案。我正在做任何错误配置吗

0 投票
0 回答
112 浏览

elastic-stack - Elastalert :如果在特定路径中找到匹配项,则发出警报

我已经配置了 elastalert 来提醒简单的模式匹配。对于我们的一项 CRM 服务,我们有多个具有相同匹配关键字的中间件组件(错误代码:404、400、500 等)有没有一种方法可以让我从特定路径查询匹配项?

Elastalert 甚至没有追踪这一事件。即使经过大量模拟。

0 投票
1 回答
198 浏览

python - Elastalert 在模块 stomp 中无法从时间导入单调

看起来自 2020 年以来 elastalert 在导入时失败

日志说:不能从时间导入单调

0 投票
0 回答
23 浏览

elastalert - Set time for ElasrAlert slack notification

I have ElastAlert set up and all of my alerts coming in once per day with aggregate set at days:1. But I get the alert in the evening and I'd prefer to get the slack alert in the morning, the alerts from the previous 24 hours included.
Can I set the time of day I want my notification to come through?

0 投票
1 回答
1414 浏览

elasticsearch - 在 elastalert-test-rule 或执行规则时未收到警报

我已经在 Windows 10 上完成了设置。为我的规则执行 elastalert-test-rule 时得到以下输出。

但是,不会触发警报。请在下面找到 config.yaml 和 example_frequency.yaml 的内容

配置.yaml

example_frequency.yaml

我缺少什么来接收警报?我也没有在控制台上看到任何错误。

0 投票
1 回答
1056 浏览

python - 无法安装“blist”以安装 ElastAlert

我正在尝试安装 ElastAlert。我已经尝试了他们文档中描述的两种方法:

1:通过 pip 安装:pip install elastalert

尝试安装“blist”时安装失败。

2:克隆 repo,使用 python setup.py install 安装 setup.py 文件

尝试安装“blist”时脚本失败。

所以我尝试单独安装“blist”:

pip install blist,失败了。

我下载了“blist”的 .exe 安装文件,它打开并告诉我我确实需要 Python 2.6 来安装它。我已经安装了 3.8.1,所以这应该不是问题吧?

我已经在这里结束了,非常感谢一些帮助:)

尝试 pip install elastalert 时出错:

错误:命令出错,退出状态为 1:命令:'c:\users\matthias.reichenberg\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; 文件='"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"';f=getattr(tokenize, '"'"' open'"'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"' );f.close();exec(编译(代码,文件, '"'"'

错误:命令 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe' 失败,退出状态为 2


错误:为 blist 构建轮子失败为 blist 运行 setup.py clean 未能构建 blist

错误:命令出错,退出状态为 1:命令:'c:\users\matthias.reichenberg\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; 文件='"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"';f=getattr(tokenize, '"'"' open'"'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"' );f.close();exec(编译(代码、文件)8\Release\blist/_blist.obj _blist.c c:\users\matthias.reichenberg\appdata\local\programs\python\python38\include\pyconfig.h(59):致命错误 C1083:无法打开包含文件:'io .h':没有这样的文件或目录错误:命令'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe'退出状态为 2 失败 ---------------------------------------- 错误:命令出错退出状态为 1:'c:\users\matthias.reichenberg\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; reichenberg\appdata\local\programs\python\python38\include\pyconfig.h(59):致命错误 C1083:无法打开包含文件:'io.h':没有这样的文件或目录错误:命令'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe' 失败,退出状态为 2 ------------- --------------------------------------- 错误:命令出错,退出状态为 1:'c:\users\matthias.reichenberg\appdata\local \programs\python\python38\python.exe' -u -c '导入系统,setuptools,tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; reichenberg\appdata\local\programs\python\python38\include\pyconfig.h(59):致命错误 C1083:无法打开包含文件:'io.h':没有这样的文件或目录错误:命令'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe' 失败,退出状态为 2 ------------- --------------------------------------- 错误:命令出错,退出状态为 1:'c:\users\matthias.reichenberg\appdata\local \programs\python\python38\python.exe' -u -c '导入系统,setuptools,tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; \Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe' 失败,退出状态为 2 ---------- ------------------------------ 错误:命令出错,退出状态为 1:'c:\users\matthias.reichenberg\ appdata\local\programs\python\python38\python.exe' -u -c 'import sys,setuptools,tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; \Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe' 失败,退出状态为 2 ---------- ------------------------------ 错误:命令出错,退出状态为 1:'c:\users\matthias.reichenberg\ appdata\local\programs\python\python38\python.exe' -u -c 'import sys,setuptools,tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; 导入 sys、setuptools、tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"'; 导入 sys、setuptools、tokenize;sys.argv[0] = '"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"';文件='"'"'C:\Users\matthias.reichenberg\AppData\Local\Temp\pip-install-f99484f4\blist\setup.py'"'"';f=getattr(tokenize, '"'"' open'"'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"' );f.close();exec(compile(code, file , '"'"'exec'"'"'))' install --record 'C:\Users\matthias.reichenberg\AppData\Local\Temp\ pip-record-we1u1k_w\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\matthias.reichenberg\appdata\local\programs\python\python38\Include \blist' 检查日志以获取完整的命令输出。

0 投票
1 回答
2523 浏览

elasticsearch - Elastalert 在一个文件中简化了多个规则

我正在Elastalart为心跳编写规则,即如果服务或机器停机,我应该得到通知。现在我可以为每个文件创建一个服务规则,如下所示。

有什么办法,我可以指定多个规则吗??...我可以指定多个过滤器,如下所示

但 Elatalert 考虑num_events所有过滤器。例如,我不想对获得Filter 13 次点击和Filter 22 次点击的情况发出警报,即 3+2=5 等于num_events.

那么,有什么方法num_events可以检查每个过滤器吗?就像如果Filter 1获得 5 次点击并Filter 2获得 3 次点击,那么我可以确认MY_LOCALHOST01真的是 DOWN 并发送警报。

我不想要多个文件。很难管理/修改。

0 投票
1 回答
240 浏览

elasticsearch - ElastAlert 过滤器未按预期工作

我已经安装了 elastAlert。下面是我的配置和yaml文件配置:

配置文件:

规则文件夹:规则

运行_每个:

分钟:15

缓冲时间:

分钟:15

es_host: ip_address(#####)

es_port:9200

writeback_index: elastalert_status

writeback_alias: elastalert_alerts

警报时间限制:

天数:2 记录:版本:1

增量:假

disable_existing_loggers:假

格式化程序:

Example_frequency.yaml 文件:

es_host: ip地址(####)

es_port:9200

名称:故障异常

类型:频率

索引:logstash_*

事件数:5

大体时间:

分钟:15

筛选:

-询问:

警报:-“电子邮件”

电子邮件:-“abc@gmail.com”

我每 15 分钟收到一次邮件,但该数据与错误组名称应为故障异常的过滤器不匹配。请帮助我理解这一点,因为我自过去 4 天以来一直在努力,在此先感谢。

0 投票
1 回答
1155 浏览

elasticsearch - 在 kibana 仪表板的 elastalert kibana 插件中创建规则

我的 Elasticsearch 和 Kibana 在 localhost:9200 和 localhost:5601 上运行。

我已经安装了 elastalert-kibana-plugin 并在端口 localhost:3030 上运行

我在 kibana 中创建了一个仪表板。

这是 kibana 仪表板的图像

现在我想在上述仪表板中的计数超过 3 时发出电子邮件警报。

现在,如何在 elastalert kibana 插件中编写规则,如下图所示,用于发出电子邮件警报。我已经为我的系统上的电子邮件警报设置了 Postfix SMTP。

我尝试过创建这样的规则:

这是规则的图像

因此,我想编写一个规则来在仪表板面板上的数据超过阈值时创建电子邮件警报。谁能告诉我如何使用 kibana 仪表板网址编写规则。