Logstash 8.0 @timestamp with nanoseconds precision

Hi,
I'd need help to understand how to set the @timestamp field with the content of another field that contains date and time with nanoseconds precision. I've tried to use the date match but it's not clear to me which pattern must be used for the scope:

  date {
    match => ["timestamp_nano", "ISO8601"]
	target => "@timestamp"
  }

where timestamp_nano is timestamp with nanoseconds precision (e.g. "2022-01-20T12:00:00.123456789Z").
By using ISO8601 there is a milliseconds precision and the rest of the digit are not reported in the @timestamp field.

Which is the pattern to be used in the match?

Thanks in advance
BRs, ale

Hi,
I got the same result by adding a pipeline in Elasticsearch:

{
        "description": "mypipeline",
        "processors": [
            {
                "date": {
                    "field": "timestamp_nano",
                    "formats": ["ISO8601"],
                    "output_format": "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ"
                }
            }
        ]
}

The timestamp_nano includes a timestamp with nanoseconds precision.
BRs

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