# Aliases and template don't work together

**URL:** https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615
**Category:** Elasticsearch
**Created:** [October 10, 2016, 8:32am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615 "2016-10-10T08:32:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cirot87](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cirot87](https://discuss.elastic.co/u/cirot87)
#### Post date: [October 10, 2016, 8:32am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/1 "2016-10-10T08:32:16Z")

</div>

hi, i'm using filebeat for manage my log and index them into elastic passing to ingest node.  
i want create an aliases for all log and i have insert this line

"aliases" : {  
"log" : { }  
}

in my filebeat template.

But when i start filebeat and index is created i don't have the alias setted into my index:

"aliases" : { },

How it's possibile? I wrong something? it's a bug?

I'm using ES 5.0.0 beta1.

---

<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: [October 10, 2016, 9:09am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/2 "2016-10-10T09:09:33Z")

</div>

Can you provide the entire template?

---

<div class="post-metadata">

### Author: ![cirot87](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cirot87](https://discuss.elastic.co/u/cirot87)
#### Post date: [October 10, 2016, 9:11am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/3 "2016-10-10T09:11:33Z")

</div>

```
This is my template 
{
  "mappings": {
    "_default_": {
      "_all": {
        "norms": false
      },
      "_meta": {
        "version": "5.0.0-beta1"
      },
      "dynamic_templates": [
        {
          "fields": {
            "mapping": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "match_mapping_type": "string",
            "path_match": "fields.*"
          }
        }
      ],
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "beat": {
          "properties": {
            "hostname": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "name": {
              "ignore_above": 1024,
              "type": "keyword"
            }
          }
        },
        "input_type": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "message": {
          "norms": false,
          "type": "text"
        },
        "offset": {
          "type": "long"
        },
        "source": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "tags": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "type": {
          "ignore_above": 1024,
          "type": "keyword"
        }
      }
    }
  },
  "order": 0,
  "settings": {
    "index.refresh_interval": "5s"
  },
  "aliases": {
        "log": {}
    },
  "template": "filebeat"
}
```

---

<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: [October 10, 2016, 9:12am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/4 "2016-10-10T09:12:28Z")

</div>

Can you format it please, use the `</>` button.

---

<div class="post-metadata">

### Author: ![cirot87](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cirot87](https://discuss.elastic.co/u/cirot87)
#### Post date: [October 10, 2016, 9:15am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/5 "2016-10-10T09:15:41Z")

</div>

i think i have fomatted it

---

<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: [October 10, 2016, 9:18am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/6 "2016-10-10T09:18:56Z")

</div>

What is the index pattern you are using in filebeat/ingest?  
Cause your template only applies to indices with a name of `filebeat`, not `filebeat-YYYY.MM.DD` which is the standard.

---

<div class="post-metadata">

### Author: ![cirot87](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cirot87](https://discuss.elastic.co/u/cirot87)
#### Post date: [October 10, 2016, 9:24am UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/7 "2016-10-10T09:24:42Z")

</div>

ohhhhh, i miss the star \*. Thank for help. Now its work

---

<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 5, 2017, 10:13pm UTC](https://discuss.elastic.co/t/aliases-and-template-dont-work-together/62615/8 "2017-07-05T22:13:39Z")

</div>


