You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Documentation] Example of the @timestamp datetime format when creating documents: DateTimeFormatter.ISO_DATE_TIME.format(OffsetDateTime.now()) #209
It's quite easy to shoot yourself in the foot with the @timestamp date format and Kibana returns no data without assistance to identify the problem.
Can you please provide an example to create a document including a @timestamp field?
Note that I eventually fixed my problem using DateTimeFormatter.ISO_DATE_TIME.format(OffsetDateTime.now()).
Example of the mistake I did:
Create an index specifying the date type for the @timestamp field
Used the Elasticsearch Java client to insert a document setting @timestamp to LocalDateTime.now().toString() (
⚠️LocalDateTime is wrong, @timestamp requires a timezone, use DateTimeFormatter.ISO_DATE_TIME.format(OffsetDateTime.now())
The document was successfully inserted
Verify the document was successfully inserted retrieving it using the Elasticsearch APIs
Try and fail to visualize in Kibana Discover.
We discovered that the cause was the invalid format of @timestamp that was lacking of a timezone, it didn't work with the range query of Kibana Discover:
changed the title [-][Documentation] Example of the`@timestamp` datetime format when creating documents[/-][+][Documentation] Example of the `@timestamp` datetime format when creating documents: `DateTimeFormatter.ISO_DATE_TIME.format(OffsetDateTime.now())`[/+]on Mar 18, 2022
Activity
[-][Documentation] Example of the`@timestamp` datetime format when creating documents[/-][+][Documentation] Example of the `@timestamp` datetime format when creating documents: `DateTimeFormatter.ISO_DATE_TIME.format(OffsetDateTime.now())`[/+]EffectShapiro commentedon Nov 30, 2022
Kind of same issue here
I am able to index document with this timestamp
I am also allowed to setup an index pattern using this field as timeField for Kibana
But then in the Discover tab i get no result :( inspecting the query reveal that the format is wrong
When replacing with
I get the results
@cyrille-leclerc did you find a way ?