Ingesting nanoseconds into elasticsearch

I'm trying to get a long of nanoseconds since Unix Epoch through logstash into a date_nanos field in elasticsearch. Since elasticsearch has this datatype, I assumed logstash does have it aswell.

However, the date-filter in logstash only supports UNIX and UNIX_MS as far as I can tell from the documentation. Does anyone have an idea how this is possible or have a workaround for this?

Thanks!

1 Like

So basically logstash doesn't support this natively yet. The workaround for this would be to simply build a string field with the format yyyy-MM-ddTHH:mm:ss.SSSSSSSSSZ. Once you have a string formatted like this, you can simply index it into an elasticsearch field with the date_nanos type.

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