# How to set routing allocation on the filebeat template

**URL:** https://discuss.elastic.co/t/how-to-set-routing-allocation-on-the-filebeat-template/304601
**Category:** Beats
**Tags:** filebeat
**Created:** [May 12, 2022, 3:22pm UTC](https://discuss.elastic.co/t/how-to-set-routing-allocation-on-the-filebeat-template/304601 "2022-05-12T15:22:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kay\_Khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kay_khan/32/45028_2.png) [@Kay\_Khan](https://discuss.elastic.co/u/Kay_Khan)
#### Post date: [May 12, 2022, 3:22pm UTC](https://discuss.elastic.co/t/how-to-set-routing-allocation-on-the-filebeat-template/304601/1 "2022-05-12T15:22:23Z")

</div>

I use ECK and i have filebeat setup. I have 3 nodeset Elasticsearch cluster, one which is named "monitoring" i have defined the node attri according to the following docs ([Index-level shard allocation filtering | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-allocation-filtering.html#:~:text=routing.,shard%20on%20the%20same%20node.)).

My goal is to allocate the default filebeat template to a specific nodeset.

```auto
...
nodeSets:
 - name: monitoring 
    count: 1
    config:
      node.store.allow_mmap: false
      node.attr.type: monitoring
...

```

My filebeat.yml config looks like the following: [Configure Elasticsearch index template loading | Filebeat Reference [8.2] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-template.html)

```auto
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
  name: filebeat
  namespace: elastic-system
spec:
  type: filebeat
  version: 8.2.0
  elasticsearchRef:
    name: elasticsearch-prod
  kibanaRef:
    name: kibana-prod
  config:
    filebeat:
      setup:
        template:
          settings:
            "index.routing.allocation.require.type": "monitoring"
...

```

However i can see the routing allocation has not been set.

**GET filebeat-\*/\_settings**

```auto
{
  ".ds-filebeat-8.2.0-2022.05.12-000001" : {
    "settings" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_hot"
            }
          }
        },
        "number_of_shards" : "1",
        "max_docvalue_fields_search" : "200"
      }
    }
  }
}

```

Any idea what i am doing wrong?

---

<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: [June 9, 2022, 5:22pm UTC](https://discuss.elastic.co/t/how-to-set-routing-allocation-on-the-filebeat-template/304601/2 "2022-06-09T17:22:56Z")

</div>

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