# Alias not picking up new index logs

**URL:** <https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065>\
**Category:** Kibana\
**Created:** [February 19, 2019, 4:37pm UTC](https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065 "2019-02-19T16:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fionamacd](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fionamacd](https://discuss.elastic.co/u/fionamacd)\
**Post date:** [February 19, 2019, 4:37pm UTC](https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065/1 "2019-02-19T16:37:27Z")

</div>

I am not sure if this is a Kibana or Logstash question really...

I have weekly indexes created from logstash:  
filebeat-prod1.week#  
filebeat-prod2.week#

I want to have an a subset of logs for only prod2 available so I thought creating an alias would be the way to go:  
POST /\_aliases  
{  
"actions" : [ { "add" : { "index" : "filebeat-prod2-\*", "alias" : "prod2",  
"filter" : { "term" : { "tags" : "integration" } } } }  
]  
}  
This worked, but the next week, when a new index was created, the alias doesn't contain any of this information. To get it working again I had to delete and add back the alias again.

Reading a bit I saw something about an alias being a point-in-time construct!

So how can a create a filtered alias of just all of prod2 logs?  
Maybe i should be creating a different index in logstash?

Seems like a common thing to want to do so maybe I am missing something obvious!!!  
Thanks,  
Fiona

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 19, 2019, 4:40pm UTC](https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065/2 "2019-02-19T16:40:59Z")

</div>

If you have an index template, you can specify the alias there so any new index is automatically linked to it.

---

<div class="post-metadata">

**Author:** ![fionamacd](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fionamacd](https://discuss.elastic.co/u/fionamacd)\
**Post date:** [February 19, 2019, 7:39pm UTC](https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065/3 "2019-02-19T19:39:37Z")

</div>

Ah good point - I forgot I created those a while back. Thanks for the suggestion - I will see how adding the alias there helps out.  
Fiona

---

<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:** [March 19, 2019, 7:39pm UTC](https://discuss.elastic.co/t/alias-not-picking-up-new-index-logs/169065/4 "2019-03-19T19:39:46Z")

</div>

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