Cluster health Yellow, unassigned_shards

976 views
Skip to first unread message

Dhruvin Shah

unread,
Apr 28, 2022, 10:36:46 AM4/28/22
to Wazuh mailing list
Hi All

I am seeing multiple  .opendistro-ism-managed-index-history indices having issues with unassigned shards. 

Can someone assist me in fixing it?

Reference:

Capture.PNG

moosemaimer

unread,
Apr 28, 2022, 11:42:43 AM4/28/22
to Wazuh mailing list
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.

Dhruvin Shah

unread,
Apr 28, 2022, 12:47:16 PM4/28/22
to Wazuh mailing list
Hey,

Thank you very much for assisting.

Following is the command which I use:
PUT _template/all
{
  "order" : 0,
  "index_patterns": ["*"],
  "settings": {
    "index": {
      "number_of_shards": "1",
      "number_of_replicas": "0"
    }
  }
}

Isn't it the same as both the commands which you shared?

kind regards

Dhruvin Shah

unread,
Apr 28, 2022, 12:50:09 PM4/28/22
to Wazuh mailing list
I am getting following error while running 1st command, I believe it is because I had run  PUT _template/all command before.

Reference:
Capture.PNG

On Thursday, 28 April 2022 at 21:12:43 UTC+5:30 moosemaimer wrote:

Dhruvin Shah

unread,
Apr 28, 2022, 12:55:42 PM4/28/22
to Wazuh mailing list
Awesome stuff.

2nd command resolved the issue.

Thanks mate

cheers
kind regards 

On Thursday, 28 April 2022 at 21:12:43 UTC+5:30 moosemaimer wrote:

Maximiliano Ibarra

unread,
Apr 28, 2022, 1:00:55 PM4/28/22
to Wazuh mailing list
Hi Dhruvin. First of all, thanks for contacting us.
I'm glad that you have solved your unassigned shard problem.
Finally, thanks Stephen for your support. Thanks for sharing your knowledge with the community.
Best regards
Reply all
Reply to author
Forward
0 new messages