0
votes

I want to organize my data in elasticsearch and visualize it using kibana.I am using elasticsearch 1.4.4 and Kibana3.

The elasticsearch for all my data is bits and I have two document types aaaa and bbbb. I run the below script at the beginning and expect a timestamp field of the format yyyy-MM-dd HH:mm:ss with value as the time of insertion of the document. MY understanding is that each document will have a timestamp field. I can't see this field in kibana. Kibana does say mappings._default_._timestamp.enabled however I can't seem to be able to set that as the index timestamp for my dashboard. What am I doing wrong here.

curl -XPOST localhost:9200/bits -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
            "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'
curl -XPOST localhost:9200/bits/aaaa -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
            "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'
curl -XPOST localhost:9200/bits/bbbb -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
            "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'
1

1 Answers

2
votes

Kibana4 doesn't show _fields by default. Go to Settings->Advanced, and add "_timestamp" to the "metaFields" option.

For Kibana3, it was reported as a bug and closed in favor of using Kibana4.