RED indices

448 views
Skip to first unread message

Walter Tomas

unread,
Apr 21, 2023, 2:14:02 AM4/21/23
to Wazuh mailing list
Hello team,
can you guide me how to delete or repair the red index?

output from:  " GET /_cluster/allocation/explain "

---------------------------------------------------------------------------------------------------

{
  "index" : "wazuh-statistics-2023.8w",
  "shard" : 0,
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "CLUSTER_RECOVERED",
    "at" : "2023-04-03T19:31:25.068Z",
    "last_allocation_status" : "no_valid_shard_copy"
  },
  "can_allocate" : "no_valid_shard_copy",
  "allocate_explanation" : "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",
  "node_allocation_decisions" : [
    {
      "node_id" : "Ln52RwvSSvCkD1sWRZ7ZjQ",
      "node_name" : "node-1",
      "transport_address" : "192.168.100.1:9300",
      "node_attributes" : {
        "shard_indexing_pressure_enabled" : "true"
      },
      "node_decision" : "no",
      "store" : {
        "found" : false
      }
    },
    {
      "node_id" : "erROqEtkTvKG39dq1uDqjw",
      "node_name" : "node-2",
      "transport_address" : "192.168.100.2:9300",
      "node_attributes" : {
        "shard_indexing_pressure_enabled" : "true"
      },
      "node_decision" : "no",
      "store" : {
        "found" : false
      }
    },
    {
      "node_id" : "o91XpSAxR8SIc_hbfsHVkA",
      "node_name" : "node-3",
      "transport_address" : "192.168.100.3:9300",
      "node_attributes" : {
        "shard_indexing_pressure_enabled" : "true"
      },
      "node_decision" : "no",
      "store" : {
        "found" : false
      }
    }
  ]
}

----------------------------------------------------------------
Thanks in advance
Tomas
red_indices.png

Pedro Nicolás Gomez

unread,
Apr 21, 2023, 8:53:03 AM4/21/23
to Wazuh mailing list
Hi Walter,

You can reroute your red index using:

POST _cluster/reroute?retry_failed

This command will take some time.

I share here a link to a thread in which a similar case was discussed:

https://groups.google.com/u/1/g/wazuh/c/R2yqByY7OlQ/m/LMYage2fBwAJ


I hope it helps.
Best regards,
Pedro Nicolas.

Walter Tomas

unread,
Apr 21, 2023, 10:10:48 AM4/21/23
to Wazuh mailing list
It's perfect.
 I managed to fix them all.

Thank you very much


-------------------------------------
         solution
-----------------------------------

POST /_cluster/reroute
{
"commands" : [
 
    {
      "allocate_empty_primary" : {
            "index" : "wazuh-monitoring-2023.12w", "shard" : 0,
            "node" : "node-1",
            "accept_data_loss":"true"
      }
    }
]
}

------------------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages