# New Index with latest timestamp

**URL:** https://discuss.elastic.co/t/new-index-with-latest-timestamp/363573
**Category:** Elasticsearch
**Created:** [July 22, 2024, 3:36pm UTC](https://discuss.elastic.co/t/new-index-with-latest-timestamp/363573 "2024-07-22T15:36:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ankita\_Pachauri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_pachauri/32/61469_2.png) [@Ankita\_Pachauri](https://discuss.elastic.co/u/Ankita_Pachauri)
#### Post date: [July 22, 2024, 3:36pm UTC](https://discuss.elastic.co/t/new-index-with-latest-timestamp/363573/1 "2024-07-22T15:36:01Z")

</div>

Hi All,

I have an index that contains time series data, essentially the status of different servers. I want to create another index from this index which should always have the latest value of data present by timestamp, for example, if the polling interval is 5 minutes and I have data with timestamps 18:00, 18:05, 18:10, then the new index must have the documents with the timestamp of 18:10. As soon as the new data arrives at 18:15, the document in the new index must get replaced by the document with 18:15 timestamp. What is a good way to achieve this within the Elastic ecosystem? Any suggestions

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2024, 2:42am UTC](https://discuss.elastic.co/t/new-index-with-latest-timestamp/363573/2 "2024-07-23T02:42:20Z")

</div>

Hi @Ankita_Pachauri

A latest transform is what you are describing.. exactly for your use case

> **[Transform overview | Elasticsearch Guide \[8.14\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-overview.html#latest-transform-overview)**

This is what I was going to suggest in your uptime topic... You could use this to always have the latest state of each monitor.

You will create a latest transform on monitor.id and use the event timestamp to drive the latest qualification.

You can step through this in the Kibana UI... It is pretty simple.

The it is very easy to build the Viz / metrics that you want

---

<div class="post-metadata">

### Author: ![Ankita\_Pachauri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_pachauri/32/61469_2.png) [@Ankita\_Pachauri](https://discuss.elastic.co/u/Ankita_Pachauri)
#### Post date: [July 24, 2024, 2:37pm UTC](https://discuss.elastic.co/t/new-index-with-latest-timestamp/363573/3 "2024-07-24T14:37:01Z")

</div>

Thanks, it worked!!
