Grok filter not parsing path

Hello,

i would like to retrieve only the name of my log file, but my grok filter doesn't work. When i put it in grok debugger it works without any problems, also logstash doesn't report any error, i just get tag grokparsefailure .

filter {
    grok {
#       break_on_match => false
#       match => { "message" => "%{SYSLOG5424SD:logtimestamp} %{GREEDYDATA:errorlog}" }
        match => { "path" => "%{URIPATH}/channel-%{WORD:channel}.log" }

    }
  }

My path is (copied from elasticsearch):
log.file.path /var/logs/channel-SMTH.log

I want my result to be only:
{
"channel": "SMTH"
}

Anyone have any idea what i did wrong?

You would need to do the match to "[log][file][path]", not just "path".

Thank you, it works now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.