# Declare index alias in filebeat.yaml and metricbeat.yaml

**URL:** https://discuss.elastic.co/t/declare-index-alias-in-filebeat-yaml-and-metricbeat-yaml/175135
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [April 3, 2019, 8:36am UTC](https://discuss.elastic.co/t/declare-index-alias-in-filebeat-yaml-and-metricbeat-yaml/175135 "2019-04-03T08:36:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![twiggy](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@twiggy](https://discuss.elastic.co/u/twiggy)
#### Post date: [April 3, 2019, 8:36am UTC](https://discuss.elastic.co/t/declare-index-alias-in-filebeat-yaml-and-metricbeat-yaml/175135/1 "2019-04-03T08:36:50Z")

</div>

Hello,

In order to implement an Index Lifecycle Management, I would like my daily indexes created by Filebeat to automatically have an alias.

I tried to add an `aliases` parameter in my `filebeat.yaml` :

```
setup.template:
  name: "filebeat"
  pattern: "filebeat-*"
  aliases: "myfilebeatalias"
  settings:
    index.number_of_shards: 1
    index.number_of_replicas: 1

```

And of course this doesn't work 🙂  
Is there a way to declare aliases in `filebeat` / `metricbeat` .yaml ?

---

<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: [May 1, 2019, 8:40am UTC](https://discuss.elastic.co/t/declare-index-alias-in-filebeat-yaml-and-metricbeat-yaml/175135/2 "2019-05-01T08:40:05Z")

</div>

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