Help converting the Date format in Logstash - 5.5.0


(Haree Krushnan) #1

My input data has a date filed which has values such as this :slight_smile:

2017-01-09-11.23.08.000000
2017-04-10-22.10.11.000000

So I went with the following date filter:

date{ match => [ "CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSS" ]
               target => "CREATEDTTM"
              }

I get a date parse failure.

As we have 6 '0's after the seconds value, do I have to provide :slight_smile:
date{ match => [ "CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSSSSS" ]
target => "CREATEDTTM"
}
OR
date{ match => [ "CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSS000" ]
target => "CREATEDTTM"
}


(Haree Krushnan) #2

Hi,

I managed to get past this issue with the following piece of code:

date{ match => [ "CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSSSSS" ]
               target => "CREATEDTTM"

(system) #3

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