I am working on some logging software and was wondering what format kibana indexes timestamps. I was thinking of using something similar to log.go for formatting log header to buffer as seen here:
Elasticsearch date fields are internally converted to UTC and stored as a long representing milliseconds-since-epoch, but can be retrieved with a number of built-in formats. For example, the Discover app in Kibana will try to request any date fields in date_time format to get back the ISO 8601 date string, which Moment JS then converts to whatever dateFormat is specified in Kibana's advanced settings.
While there are no hard and fast rules here, in general I would recommend following the Elastic Common Schema, which suggests a @timestamp field that is an ISO 8601 date string.
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.