# Index states are Yellow

**URL:** <https://forum.opensearch.org/t/index-states-are-yellow/4646>\
**Category:** Index Management\
**Created:** [January 20, 2021, 5:08pm UTC](https://forum.opensearch.org/t/index-states-are-yellow/4646 "2021-01-20T17:08:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsatya](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dsatya](https://forum.opensearch.org/u/dsatya)\
**Post date:** [January 20, 2021, 5:08pm UTC](https://forum.opensearch.org/t/index-states-are-yellow/4646/1 "2021-01-20T17:08:32Z")

</div>

I have a single node ODFE running and all my indexes (except for internal ones) are yellow. the replica count is set to 1.

Guessing they are yellow because of replica count of 1 instead of 0.

**So, trying to figure out HOW and WHERE to set the replica count to 0 at creation time.**

I already have index templates for deletion of older indexes. This works fine.  
PUT \_index\_template/dev\_5day  
{  
“index\_patterns”: [“dev\*”],  
“template”: {  
“settings”: {  
“opendistro.index\_state\_management.policy\_id”: “DELETE\_DEV\_5day\_policy”  
}  
}  
}  
– DEV 5 day policy  
{  
“policy”: {  
“policy\_id”: “DELETE\_DEV\_5day\_policy”,  
“description”: “Delete DEV indexes older than 5 days.”,  
“last\_updated\_time”: 1610981377958,  
“schema\_version”: 1,  
“error\_notification”: null,  
“default\_state”: “open”,  
“states”: [  
{  
“name”: “open”,  
“actions”: [  
{  
“open”: {}  
}  
],  
“transitions”: [  
{  
“state\_name”: “delete”,  
“conditions”: {  
“min\_index\_age”: “5d”  
}  
}  
]  
},  
{  
“name”: “delete”,  
“actions”: [  
{  
“delete”: {}  
}  
],  
“transitions”:   
}  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![jathin12](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jathin12](https://forum.opensearch.org/u/jathin12)\
**Post date:** [January 25, 2021, 9:37pm UTC](https://forum.opensearch.org/t/index-states-are-yellow/4646/2 "2021-01-25T21:37:52Z")

</div>

You can add below settings to your template, and new indices are created with 0 replica’s  
`"index.number_of_replicas" : "0"`

Note: you cannot update a property on a template… but you will need to recreate the template with all the settings you need. check [this](https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/index-templates/) for more details

If you need to update existing indices to not have any replica then you will need to update index settings via this api

```
PUT index_name/_settings
{
"index.number_of_replicas" : "0"
}

```

---

<div class="post-metadata">

**Author:** ![dsatya](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dsatya](https://forum.opensearch.org/u/dsatya)\
**Post date:** [January 29, 2021, 9:17pm UTC](https://forum.opensearch.org/t/index-states-are-yellow/4646/3 "2021-01-29T21:17:31Z")

</div>

Thank you for your reply. I was able to accomplish this with trial and error!. This will help others also.

we can do wildcards also…

PUT dev\*/\_settings  
{  
“index.number\_of\_replicas” : “0”  
}
