# Template Index Routing

**URL:** <https://community.graylog.org/t/template-index-routing/1422>\
**Category:** Graylog Central (peer support)\
**Created:** [June 12, 2017, 1:28pm UTC](https://community.graylog.org/t/template-index-routing/1422 "2017-06-12T13:28:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![triggert](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@triggert](https://community.graylog.org/u/triggert)\
**Post date:** [June 12, 2017, 1:28pm UTC](https://community.graylog.org/t/template-index-routing/1422/1 "2017-06-12T13:28:32Z")

</div>

Is it possible to define the index.routing.allocation.require.box\_type in the graylog-internal template? Changes to the template are not holding so each new indice has to be updated manually.

Referenced from the the Elasticsearch hot warm architecture for ES version 2.x.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [June 12, 2017, 2:29pm UTC](https://community.graylog.org/t/template-index-routing/1422/2 "2017-06-12T14:29:23Z")

</div>

This should be possible with a custom index template: [http://docs.graylog.org/en/2.2/pages/configuration/elasticsearch.html#custom-index-mappings](http://docs.graylog.org/en/2.2/pages/configuration/elasticsearch.html#custom-index-mappings)

---

<div class="post-metadata">

**Author:** ![triggert](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@triggert](https://community.graylog.org/u/triggert)\
**Post date:** [June 12, 2017, 3:15pm UTC](https://community.graylog.org/t/template-index-routing/1422/3 "2017-06-12T15:15:06Z")

</div>

Thanks - based on that link, would this be the correct graylog-custom-mapping.json?

```json
{
  "template": "graylog_*",
  "mappings" : {
    "settings" : {
      "properties" : {
        "index": {
          "routing": {
            "allocation": {
              "require": {
                "box_type": "hot"
              }
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [June 12, 2017, 3:29pm UTC](https://community.graylog.org/t/template-index-routing/1422/4 "2017-06-12T15:29:52Z")

</div>

> [@triggert](#):
>
> would this be the correct graylog-custom-mapping.json?

No. Index settings must not be listed within the `mappings` dictionary.

See [Index Templates | Elasticsearch Guide [2.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html) for details.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [June 26, 2017, 3:30pm UTC](https://community.graylog.org/t/template-index-routing/1422/5 "2017-06-26T15:30:16Z")

</div>

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