# Problems with Number of replicas and UNASSIGNED errors

**URL:** https://discuss.elastic.co/t/problems-with-number-of-replicas-and-unassigned-errors/342138
**Category:** Elastic Agent
**Created:** [September 1, 2023, 4:31pm UTC](https://discuss.elastic.co/t/problems-with-number-of-replicas-and-unassigned-errors/342138 "2023-09-01T16:31:30Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 4, 2023, 5:21pm UTC](https://discuss.elastic.co/t/problems-with-number-of-replicas-and-unassigned-errors/342138/7 "2023-09-04T17:21:28Z")

</div>

Hi @Ednei_Rodrigues

Perhaps I can clarify a bit.

Assuming you only have a single node what you are seeing with unallocated replicas is normal behavior AND you are not actually required to fix anything but you will see Yellow health.

What @HiteshSingh suggested was to set the replicas to 0 on **existing** indices not the template which will be used when **new** indices are created. It looks like You tried to apply the setting to the template  
.. which you can but will need to use the correct syntax

From what it looks to me you are using metricbeat and agent , these have built in built template s.

All in all your cluster and replicas are operating as the should and really the **Yellow** status is to remind you that with only one node you could have data loss.

Perhaps take a look at this thread

> [@Has anyone come up with a maintainable way to set index.number\_of\_replicas cluster wide?](https://discuss.elastic.co/t/has-anyone-come-up-with-a-maintainable-way-to-set-index-number-of-replicas-cluster-wide/341288):
>
> Thanks to budget issues, I'm trying to slim down the footprint of my Elastic stack. While not ideal, running in single-node mode would make things easier to manage. But, as far as I can tell, Elastic Agent creates everything to have at least 1 replica. Due to the [defaults](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/index-modules.html#dynamic-index-settings) I'm sure. That results in any single node cluster always using twice as much space as it should, and always being "yellow". Not exactly the setup I need. index.number\_of\_replicas is the setting I think I need to update. Set…

Hope this helps

---

_[View the full topic](https://discuss.elastic.co/t/problems-with-number-of-replicas-and-unassigned-errors/342138)._
