How to check with * wildcard condition in Logstash filter


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

    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?


Use a regular expression match.

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

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