Hi Franco,
Your documentation does not illustrate rolling over indices.
What I am getting stuck on is supporting rolling over of the alerts and archive indicies.
I have created two additional entries in the existing wazuh-templates.json file
{
"order": 2,
"index_patterns": [
"wazuh-alerts-*"
],
"settings": {
"index.plugins.index_state_management.rollover_alias": "wazuh-alerts"
},
"order": 1,
"index_patterns": [
"wazuh-archives-*"
],
"settings": {
"index.plugins.index_state_management.rollover_alias": "wazuh-archives"
},
"order": 0,
"index_patterns": [
"wazuh-alerts-4.x-*",
"wazuh-archives-4.x-*"
],
Although I can tell that the management.rollover.alias is not being applied.
GET wazuh-archives*/_settings
{
"wazuh-archives-4.x-2024.04.26-000001": {
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "10000"
}
},
"refresh_interval": "5s",
"number_of_shards": "1",
"auto_expand_replicas": "0-1",
"provided_name": "<wazuh-archives-4.x-{now/d}-000001>",
"query": {
I have to manually run this although it only applies to the current indicies, not to any newly created indicies which should happen in the template file.
PUT /wazuh-archives*/_settings
{
"index.plugins.index_state_management.rollover_alias" : "wazuh-archives"
}
"Setting rollover alias to the indices
The wazuh-template.json applies to the wazuh-alerts and wazuh-archives indices, so the only way to apply an individual alias for each one is to
create 2 new index templates only to add the alias, acting on these indices separately and with a higher order than the base wazuh-template.{ "order": 3, "index_patterns": ["wazuh-alerts-*"], "settings": { "index.plugins.index_state_management.rollover_alias": "wazuh-alerts" } }
{ "order": 3, "index_patterns": ["wazuh-archives-*"], "settings": { "index.plugins.index_state_management.rollover_alias": "wazuh-archives" } }"