I'm using the following to add an ingestion timestamp to my records:
ruby {
code => 'event.set("ingest_time", Time.now.strftime("%Y-%m-%d %H:%M:%S.%3"))'
}
What I'm getting in my data, thought, is:
ingest_time 2020%-06-23 22:09:45.
Which is missing the milliseconds - does logstash not support the %3 token?
It also has an extra % after the year - which must be coming out of ruby as the % in the format string is after the hyphen ( %Y-%m... ).
Any ideas?