Index states are Yellow

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”:
}
]
}
}

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 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"
}
1 Like

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”
}