How to check with * wildcard condition in Logstash filter

Hi,

I am using Logstash GA 6.3.0. In my Logstash, inside filter, I am checking a url like;

filter{
    if [requestUrl] == "/section1/process1" {
        //doing some stuff here
    }
}

This is working fine. But this wont filter if requestUrl is something like /section1/process1?query. How can I do this?

Thanks

Use a regular expression match.

if [requestUrl] =~ /^\/section1\/process1/ {

https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#conditionals

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