# Filter on Alias

**URL:** <https://discuss.elastic.co/t/filter-on-alias/264463>\
**Category:** Elasticsearch\
**Created:** [February 16, 2021, 6:10pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463 "2021-02-16T18:10:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oscar_lopez/32/81334_2.png) [@Oscar\_Lopez](https://discuss.elastic.co/u/Oscar_Lopez)\
**Post date:** [February 16, 2021, 6:10pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463/1 "2021-02-16T18:10:51Z")

</div>

Good afternoon, at the moment I am investigating how to restrict the filters of the kibana boards by time, at the moment I have a query that works for the alias\_metricbeat of the index pattern metricbeat- \*, however I see an inconvenience the pointing in the boards must switch to the alias, is there another way to do it?

POST /\_aliases  
{  
"actions": [  
{  
"add": {  
"index": "metricbeat-\*",  
"alias": "alias\_metricbeat",  
"filter": { "range": { "@timestamp": {"gte": "now-1M"}}}  
}  
}  
]  
}

---

<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:** [February 16, 2021, 11:11pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463/2 "2021-02-16T23:11:40Z")

</div>

No, there's no other way to do this sorry.

What's the drive behind wanting to restrict access to specific timeframes?

---

<div class="post-metadata">

**Author:** ![Oscar\_Lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oscar_lopez/32/81334_2.png) [@Oscar\_Lopez](https://discuss.elastic.co/u/Oscar_Lopez)\
**Post date:** [February 17, 2021, 4:43pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463/3 "2021-02-17T16:43:46Z")

</div>

The reason is that there are users who consult from the kibana boards with time ranges for more than a year and this makes the cluster slow down, we already apply ILM policies where we include the rollover process, and while we implement the cycle well data lifetime, we thought about restricting the time range to some users.

---

<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:** [February 17, 2021, 9:53pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463/4 "2021-02-17T21:53:15Z")

</div>

The issue there is you are now having to manage the aliases and the dashboards.

---

<div class="post-metadata">

**Author:** ![Oscar\_Lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oscar_lopez/32/81334_2.png) [@Oscar\_Lopez](https://discuss.elastic.co/u/Oscar_Lopez)\
**Post date:** [February 18, 2021, 3:42pm UTC](https://discuss.elastic.co/t/filter-on-alias/264463/5 "2021-02-18T15:42:04Z")

</div>

ok thanks Warkolm

---

<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:** [November 4, 2022, 8:24am UTC](https://discuss.elastic.co/t/filter-on-alias/264463/6 "2022-11-04T08:24:17Z")

</div>


