Time format 30.12.2019 14:06:00 GMT+00:00

Dear all,

Any idea how to match the following date format?

30.12.2019 14:06:00 GMT+00:100 

This is not working

dd.MM.yyy HH:mm:ss zzz

Can you explain what that format means?

Sure, sorry about that. I am getting _dateparsefailure

I have the following config file:

input {
        file {
            path => "/Users/yanivnuriel/logstash/data/tests/gmt/test.csv"
            start_position => "beginning"
            sincedb_path => "NUL"
        }
}
filter{

    csv {
        separator => ","
        autodetect_column_names => true
        autogenerate_column_names => true

    	columns => ["date/time"]
    	
    }

    date {
        match => ["date/time",  "dd.MM.yyy HH:mm:ss" ]
        timezone => "GMT"
        target => "@timestamp"
    }
}

output {
    stdout { }
}

With the following source:

"date/time"
24.03.2020 01:59:38 GMT+00:00

and the output is:

{
    "@timestamp" => 2020-04-22T16:01:36.040Z,
       "message" => "24.03.2020 01:59:38 GMT+00:00",
     "date/time" => "24.03.2020 01:59:38 GMT+00:00",
          "tags" => [
        [0] "_dateparsefailure"
    ],
          "host" => "Yanivs-MBP",
      "@version" => "1",
          "path" => "/Users/yanivnuriel/logstash/data/tests/gmt/test.csv"
}

I would try

date { match => [ "message", "dd.MM.YYYY HH:mm:ss 'GMT'ZZ" ] }
1 Like

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