由于待分析的日志第一行需要过滤掉,所以写了下面的语句,但运行总会报错:expected one of # after if,求高手指点:
grok {
match => [ "message", "%{NOTSPACE:name}|%{NOTSPACE:taskid}|%{NOTSPACE:codes}" ]
if [codes] =~ "nil"
{
drop{}
}
}
grok {
match => [ "message", "%{NOTSPACE:name}|%{NOTSPACE:taskid}|%{NOTSPACE:codes}" ]
if [codes] =~ "nil"
{
drop{}
}
}
1 个回复
ttssrs
赞同来自: medcl