Step 1:
----------------------------------
PUT _index_template/ism_history_indices
{
"index_patterns": [
".opendistro-ism-managed-index-history-*"
],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
}
}
}
----------------------------------
Step 2:
----------------------------------
PUT /.opendistro-ism-managed-index-history*/_settings
{
"index": {
"number_of_replicas": "0"
}
}
----------------------------------
You can repeat step 2 with the name of any other index that has unassigned replica shards. Once you've flushed them all the cluster should go green.