如何使用grok滤波器过滤掉文件路径并添加为新字段
我想从/lib/logs/scm_output.log
过滤scm_output
部分,此文件路径和abc_output
从此文件路径,/lib/logs/abc_output.log
,并将新字段添加为scm_output
& ABC_OUTPUT
。
我已经尝试过,
grok {
match => { "[log][file][path]" => "%{PATH}%{GREEDYDATA:name}\.*+%{GREEDYDATA}.log" }
}
但没有得到任何结果。
我是Elk和Grok Filter的新手,请帮助我过滤它们。
I want to filter out scm_output
portion from /lib/logs/scm_output.log
this file path and abc_output
from this file path , /lib/logs/abc_output.log
, and add new fields as scm_output
& abc_output
.
I have tried this,
grok {
match => { "[log][file][path]" => "%{PATH}%{GREEDYDATA:name}\.*+%{GREEDYDATA}.log" }
}
But not getting any result.
I am new to ELK and GROK filter, please help me to filter these.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下grok模式应该适合您
保持发布!!!谢谢 !!!
The below grok pattern should work for you
Keep Posted!!! Thanks !!!