Heartbeat.yml file number_of_replicas not being applied

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?

# 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

Hi @Daniel.X

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


# 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

Regards

Cool, thanks Shahzad!

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