# How do I set number of replica to zero in metricbeat?

**URL:** https://discuss.elastic.co/t/how-do-i-set-number-of-replica-to-zero-in-metricbeat/256618
**Category:** Beats
**Tags:** metricbeat
**Created:** [November 25, 2020, 8:44am UTC](https://discuss.elastic.co/t/how-do-i-set-number-of-replica-to-zero-in-metricbeat/256618 "2020-11-25T08:44:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Webtrend\_Inc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/webtrend_inc/32/70034_2.png) [@Webtrend\_Inc](https://discuss.elastic.co/u/Webtrend_Inc)
#### Post date: [November 25, 2020, 8:44am UTC](https://discuss.elastic.co/t/how-do-i-set-number-of-replica-to-zero-in-metricbeat/256618/1 "2020-11-25T08:44:11Z")

</div>

I have only 1 node cluster and hence I need only 1 shard and 0 replica for all my indices. I cannot set the number of replica to 0 for metricbeat index. My yml file looks like this:

```auto
    setup.template.name: "metricbeat"
    setup.template.pattern: "metricbeat-*"
    setup.template.overwrite: true
    setup.template.enabled: false
    setup.template.settings:
      index.number_of_shards: 1
      index.number_of_replicas: 0
      index.codec: best_compression

```

What am I missing?

Sorry forgot to mention this is for version 7.10

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [November 26, 2020, 5:52am UTC](https://discuss.elastic.co/t/how-do-i-set-number-of-replica-to-zero-in-metricbeat/256618/2 "2020-11-26T05:52:05Z")

</div>

Hi,

> [@Webtrend\_Inc](#):
>
> I cannot set the number of replica to 0 for metricbeat index

Does it give you an error message or does it just not work?

As `setup.template.enabled` is `false` the template will not be loaded automatically - did you load the template [manually](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-template.html#load-template-manually)?

Best regards  
Wolfram

---

<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 24, 2020, 7:52am UTC](https://discuss.elastic.co/t/how-do-i-set-number-of-replica-to-zero-in-metricbeat/256618/3 "2020-12-24T07:52:12Z")

</div>

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