# Created timestamp on elasticsearch output

**URL:** https://discuss.elastic.co/t/created-timestamp-on-elasticsearch-output/125384
**Category:** Logstash
**Created:** [March 23, 2018, 3:24pm UTC](https://discuss.elastic.co/t/created-timestamp-on-elasticsearch-output/125384 "2018-03-23T15:24:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JamesB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamesb/32/24343_2.png) [@JamesB](https://discuss.elastic.co/u/JamesB)
#### Post date: [March 23, 2018, 3:24pm UTC](https://discuss.elastic.co/t/created-timestamp-on-elasticsearch-output/125384/1 "2018-03-23T15:24:42Z")

</div>

On ES 6.2 and Logstash 6.1, currently I'm using doc\_as\_upsert with a document id defined by incoming fields. This is to allow updates. However I would also like to maintain a 'created at' date which will be set the first time a document is created. Is there a way in the logstash elasticsearch output to specify a field to exclude from the upsert in order to ensure it is not overwritten?

Cheers.

---

<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: [April 20, 2018, 3:32pm UTC](https://discuss.elastic.co/t/created-timestamp-on-elasticsearch-output/125384/2 "2018-04-20T15:32:12Z")

</div>

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