# Index alias with sliding time window

**URL:** <https://discuss.elastic.co/t/index-alias-with-sliding-time-window/22822>\
**Category:** Elasticsearch\
**Created:** [March 23, 2015, 12:57pm UTC](https://discuss.elastic.co/t/index-alias-with-sliding-time-window/22822 "2015-03-23T12:57:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gorge\_Albrecht](https://avatars.discourse-cdn.com/v4/letter/g/d6d6ee/32.png) [@Gorge\_Albrecht](https://discuss.elastic.co/u/Gorge_Albrecht)\
**Post date:** [March 23, 2015, 12:57pm UTC](https://discuss.elastic.co/t/index-alias-with-sliding-time-window/22822/1 "2015-03-23T12:57:30Z")

</div>

Hi,

when using ELK with standard configuration an new logstash index is created  
every day.  
Is there a possibility to create an alias, say "last-week" which always  
covers the last 7 days?

I found several places within the ES docs where aliases like "last\_3\_month"  
or "current\_day" are used in index templates.  
But I don't get how to you use these for a sliding time window.

Thanks in advance,  
Görge

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 23, 2015, 7:43pm UTC](https://discuss.elastic.co/t/index-alias-with-sliding-time-window/22822/2 "2015-03-23T19:43:54Z")

</div>

You just need to add them yourself, it's not an automatic process.

Use something like Elasticsearch Curator (  
[GitHub - elastic/curator: Curator: Tending your Elasticsearch indices](https://github.com/elasticsearch/curator)).

On 23 March 2015 at 23:57, Görge Albrecht [goerge.albrecht@gmail.com](mailto:goerge.albrecht@gmail.com) wrote:

> Hi,
> 
> when using ELK with standard configuration an new logstash index is  
> created every day.  
> Is there a possibility to create an alias, say "last-week" which always  
> covers the last 7 days?
> 
> I found several places within the ES docs where aliases like  
> "last\_3\_month" or "current\_day" are used in index templates.  
> But I don't get how to you use these for a sliding time window.
> 
> Thanks in advance,  
> Görge
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/daef90c2-cad2-4387-9c0b-359fbb6794bf%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-bv7oStPCOiG2G9TUJq-h2x-\_av-%3DBeF\_-b9aWUJQdaw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-bv7oStPCOiG2G9TUJq-h2x-_av-%3DBeF_-b9aWUJQdaw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:24am UTC](https://discuss.elastic.co/t/index-alias-with-sliding-time-window/22822/3 "2017-07-06T00:24:43Z")

</div>


