# Autogenerate timespace field when each index entry is created in elastic search

**URL:** https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969
**Category:** Elasticsearch
**Created:** [August 17, 2018, 9:40pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969 "2018-08-17T21:40:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)
#### Post date: [August 17, 2018, 9:40pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/1 "2018-08-17T21:40:52Z")

</div>

I am trying to crudely measure latency in ELK env's. I cannot install xpack, etc. What will help me greatly is if I can config elastic search to autogenerate a timestamp field when it creates the index entry. I have done some reading and \_timestamp seems chucked post 2.x. I am on 5.6. Generating this field anywhere else beside index entry creation time won't help me in this particular circumstance. It must be right at the point the entry gets created.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [August 17, 2018, 9:46pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/2 "2018-08-17T21:46:52Z")

</div>

You can do this if you can send the data through an ingest pipeline.

---

<div class="post-metadata">

### Author: ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)
#### Post date: [August 17, 2018, 9:55pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/3 "2018-08-17T21:55:07Z")

</div>

Not sure i totally follow. There is something in elastic search called that?  
We are using filebeat-\>logstash-\>elastic, where logstash is just using elasticsearch plugin. But as I stated, I just want the timestamp when elastic's code is actually creating an individual index entry for a document. Are you referring to that?

---

<div class="post-metadata">

### Author: ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)
#### Post date: [August 17, 2018, 9:56pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/4 "2018-08-17T21:56:34Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> ingest pipeline

unless you mean this:

> **[Ingest pipelines | Elasticsearch Guide \[master\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html)**

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [August 17, 2018, 9:59pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/5 "2018-08-17T21:59:35Z")

</div>

There is an example in [this blog post](https://www.elastic.co/blog/should-i-use-logstash-or-elasticsearch-ingest-nodes) of how to use an ingest pipeline to record the timestamp the document is processed by Elasticsearch and calculate the ingest delay. Something like that might work for you.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 14, 2018, 9:59pm UTC](https://discuss.elastic.co/t/autogenerate-timespace-field-when-each-index-entry-is-created-in-elastic-search/144969/6 "2018-09-14T21:59:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
