How to print the values or grok expression and the line it is working on and file name and path

i try to find how to print to log the name of the log file and the line the grok expretion is working on right now .

here the logstash config : 
input {
      s3 {
        "access_key_id" => "xxxx"
        "secret_access_key" => "xxxx"
        "bucket" => "perso-logstash-logs"
        "additional_settings" => {
        "force_path_style" => true
        "follow_redirects" => false
        }
        
      }
    }
    filter {
    
    grok {
        match => {
            "path" => "xxx-logstash-logs/(?<version>[^/]+)/(?<projname>[^/]+)/(?<myId>[^/]+)/" 
        }
    }
    

    
    }
    output {
      stdout { codec => rubydebug }
      elasticsearch {
        index => "%{version}-%{projname}-%{myId}-%{+YYYY.MM.dd}"
        hosts => [ "http://xxxx.svc:9200" ]
        user => "elastic"
        password => "xxxxxx"
        codec => "json"
      }
    }

How can i see in logs which line the grok is processing right now and
what is the name of the file name and its full path, basically i like to know if the regexp
capture the file .
also how can i print the version, projname, myId group values ?

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