Hello Guys,
need some help.
In my logstash I am reading a date pattern from input files.
I have defined a format in my mapping with dd/MM/yyyy HH:mm:ss.SSS, so when it reads the input files it would follow the format i defined in mapping.
Now older files have a different format, where in old files have no milisecond(SSS) included in them. Reading around the discussion, it is said that Logstash should automatically fill up the missing milisecondds. Yet they dont, instead logstash throws a mapper_parsing_exception. As seen in the image below:
I tried appending data when it encounters a dateparsefailure, like below:
date { match => [ "tslice", "dd/MM/yyyy HH:mm:ss "] } if ([tags] == "_dateparsefailure"){ mutate { update => {"tslice" => "%{tslice}.000" } } }
So when it encounters the date, it would append zeroes which would match the dateformat defined in my mapping.
How do I make it that it will accept the input with no milisecond, and replace it with zeroes instead.
Any advice would be greatly appreciated!