# Add timestamp to index created by Watcher action

**URL:** <https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [July 27, 2021, 1:28am UTC](https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682 "2021-07-27T01:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![twilight](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/twilight/32/83450_2.png) [@twilight](https://discuss.elastic.co/u/twilight)\
**Post date:** [July 27, 2021, 1:28am UTC](https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682/1 "2021-07-27T01:28:22Z")

</div>

Hello,

This is related to Watchers using 'index' action i.e. putting alert info (key, value) to the specified log.

However I noticed that the index entries don't have any date/timestamp field, how can I add a new field and set it as auto timestamp so that I can sort the log data according to the time they were created or watcher was fired.

Thanks

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [July 30, 2021, 10:04am UTC](https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682/2 "2021-07-30T10:04:08Z")

</div>

Hello,

You can add the time of watch execution in the indexed document by adding the `execution_time_field` to the index action configuration:

> **[Watcher index action | Elasticsearch Guide \[7.13\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-index.html)**

---

<div class="post-metadata">

**Author:** ![twilight](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/twilight/32/83450_2.png) [@twilight](https://discuss.elastic.co/u/twilight)\
**Post date:** [August 1, 2021, 6:20pm UTC](https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682/3 "2021-08-01T18:20:05Z")

</div>

Thanks, it helped.

---

<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:** [August 29, 2021, 6:20pm UTC](https://discuss.elastic.co/t/add-timestamp-to-index-created-by-watcher-action/279682/4 "2021-08-29T18:20:37Z")

</div>

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