Recognising timestamps in Kibana and ElasticSearch

后端 未结 3 1351
囚心锁ツ
囚心锁ツ 2021-02-10 04:05

I\'m new to ElasticSearch and Kibana and am having trouble getting Kibana to recognise my timestamps.

I have a JSON file with lots of data that I wish to insert into Ela

3条回答
  •  孤城傲影
    2021-02-10 04:33

    Managed to solve the problem. So for anyone else having this problem:

    The format we had our date saved in was incorrect, needed to be :

    "_timestamp":"2013-07-05 08:49:30.123"
    

    then our mapping needed to be:

    curl -XPUT 'http://localhost:9200/test/container/_mapping' -d'
    {
    "container" : {
    "_timestamp" : {"enabled": true, "type":"date", "format": "yyyy-MM-dd HH:mm:ss.SSS", "store":true, "path" : "_timestamp"}
    }
    }'
    

    Hope this helps someone.

提交回复
热议问题