如何在Logstash config文件的过滤器块中调用这些python脚本?

2024-06-16 11:57:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我必须解析日志文件。为此,我编写了python脚本来匹配我的特定需求。如何在Logstash config文件的过滤器块中调用这些python脚本。你知道吗

我试过这个:

http://vrepin.org/vr/Logstash-filter-external-script/

Python脚本:

import re 
Regex = re.compile (r'Test') 
hello= Regex.search('Test is completed') 
print(`found')

我无法使用ruby{}触发python脚本


Tags: 文件orgtestre脚本confighttp过滤器