# Heartbeat.yml file number\_of\_replicas not being applied

**URL:** <https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [November 9, 2021, 1:46am UTC](https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691 "2021-11-09T01:46:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel.X](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel.x/32/77408_2.png) [@Daniel.X](https://discuss.elastic.co/u/Daniel.X)\
**Post date:** [November 9, 2021, 1:46am UTC](https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691/1 "2021-11-09T01:46:10Z")

</div>

Heartbeat Version: 7.14.0

Hi there,

I configured our heartbeat that runs as sidecar container on AWS ECS using the heartbeat.yml file configuration. I set the `number_of_replicas` to be 0 (see code snippet below). However, when I checked the index that had been created, the `number_of_replicas` is set to 1 (maybe its default?). Any reason why the change is not propagating? Also, just to double check, I consoled inside the heartbeat container running and saw that the `number_of_replicas` is set to 0 in the `heartbeat.yml` file. The only workaround I'm doing at the moment is to manually set the `number_of_replicas` in the index management console from 1 to 0. Is `number_of_replicas` not supported inside the heartbeat.yml file?

```auto
# Elasticsearch template settings
setup.template.settings:

  # A dictionary of settings to place into the settings.index dictionary
  # of the Elasticsearch template. For more details, please check
  # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
  index:
    number_of_shards: 1
    number_of_replicas: 0
    #codec: best_compression

  # A dictionary of settings for the _source field. For more details, please check
  # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
  #_source:
    #enabled: false

```

---

<div class="post-metadata">

**Author:** ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)\
**Post date:** [November 9, 2021, 8:51am UTC](https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691/2 "2021-11-09T08:51:10Z")

</div>

Hi @Daniel.X

I checked the heartbeat reference yaml, and it does seems to support the all the setup template settings

```auto

# Elasticsearch template settings
setup.template.settings:

  # A dictionary of settings to place into the settings.index dictionary
  # of the Elasticsearch template. For more details, please check
  # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
  #index:
    #number_of_shards: 1
    #codec: best_compression

  # A dictionary of settings for the _source field. For more details, please check
  # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
  #_source:
    #enabled: false

```

However i can reproduce the issue locally. i have opened a bug in the beats repo to fix this, please follow along [Heartbeat not propagating ```number_of_replicas``` settings to index settings · Issue #28886 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/28886)

Regards

---

<div class="post-metadata">

**Author:** ![Daniel.X](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel.x/32/77408_2.png) [@Daniel.X](https://discuss.elastic.co/u/Daniel.X)\
**Post date:** [November 10, 2021, 6:14am UTC](https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691/3 "2021-11-10T06:14:38Z")

</div>

Cool, thanks Shahzad!

---

<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:** [December 8, 2021, 8:15am UTC](https://discuss.elastic.co/t/heartbeat-yml-file-number-of-replicas-not-being-applied/288691/4 "2021-12-08T08:15:17Z")

</div>

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