How to find out the index creation date in elasticsearch

Johnsa Philip picture Johnsa Philip · Feb 19, 2014 · Viewed 15.2k times · Source

How to find out the index created date in elastic search?

Answer

Lee H picture Lee H · Apr 18, 2015

Elasticsearch now automatically includes the creation date for an index, for example:

If I create a new index (with no settings)

curl -XPOST 'localhost:9200/aoeu'
{"acknowledged":true}

I can now 'get' the index to retrieve its metadata:

curl -XGET 'localhost:9200/aoeu'
{
  "aoeu": {
    "aliases": {},
    "mappings": {},
    "settings": {
      "index": {
        "creation_date": "1429308615170",
        "number_of_replicas": "1",
        "number_of_shards": "5",
        "uuid": "C5sqwXClSFyd5uF3MSrVgg",
        "version": {
          "created": "1050199"
        }
      }
    },
    "warmers": {}
  }
}

You can see the creation_date field above.