# Picking latest index in kibana dashboard

**URL:** https://discuss.elastic.co/t/picking-latest-index-in-kibana-dashboard/192945
**Category:** Kibana
**Created:** [July 30, 2019, 4:17pm UTC](https://discuss.elastic.co/t/picking-latest-index-in-kibana-dashboard/192945 "2019-07-30T16:17:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)
#### Post date: [July 30, 2019, 6:16pm UTC](https://discuss.elastic.co/t/picking-latest-index-in-kibana-dashboard/192945/2 "2019-07-30T18:16:34Z")

</div>

Hi, one idea I have is to set up an [Index Alias](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html). For example this will create the alias `latest_somestaticname` that points to 2019.07.18 indices:

```auto
POST /_aliases
{
    "actions" : [
        { "add" : { "index" : "somestaticname-*-.2019.07.18*", "alias" : "latest_somestaticname" } }
    ]
}

```

Then you can set up an index pattern that uses the alias `latest_somestaticname` instead of the time series index names and use that index pattern for the dashboard.

However this will require you to update the alias after the new indices are created each day. Would this be possible to integrate into your rollover workflow or a separate cron script?

Another similar idea is to use a [Filtered Alias](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#filtered) on the pattern `somestaticname-*-*` and filtering by some date field.

---

_[View the full topic](https://discuss.elastic.co/t/picking-latest-index-in-kibana-dashboard/192945)._
