I am trying to use Filebeat 7.5.1 to parse a timestamp with the following format: '2020-01-17 06:37:17,849'
My layout is this: '2006-01-02 15:04:05,999'
Unfortunately, the above does not work. According to Golang docs, I need to define milliseconds with a period (e.g., ".999"). Indeed, if I change both the sample and the layout to use a period, it works. I am linking here the Go Playground for this.
Is there a way to get the timestamp processor to do what I need it to do? If not, is there some other way to get around this? For example, I couldn't find a way to concatenate fields, otherwise I could possibly use a dissect processor to split the comma out, and then join the fields with a period in the middle.
The processor is pretty strict about the format of the fractional seconds. I've seen a few workarounds. What you mention with dissect would work. You could using the script processor in Beats to replace the comma with a period before running the timestamp processor.
You could defer the timestamp parsing to LS or ES Ingest Node, both have a more flexible date processor.
Andrew, that worked perfectly. Thank you so much for your assistance. I am not sure how I didn't see that "script" processor when I was looking for a solution, I will definitely keep it in mind from now on!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.