Hello Ismail,
You can use the Split Index to accomplish this for the indices already indexed in your system. For instance:
POST /my-index-000001/_split/split-my-index-000001
{
"settings": {
"index.number_of_shards": 2
}
For the new logs, I would recommend editing the indexing pipeline:
/usr/share/filebeat/module/wazuh/alerts/ingest/pipeline.json :
Then, you can create a filter based on the field on the Wazuh alerts. For instance
{
"date_index_name": {
"if": "ctx.agent?.groups == 'groupa'",
"field": "timestamp",
"date_rounding": "d",
"index_name_prefix": "{{fields.index_prefix}}groupa-",
"index_name_format": "yyyy.MM.dd",
"ignore_failure": true
}
},
Then, you need to reload the pipeline:
filebeat setup --pipelines
Once completed, you may need to create the new index pattern.
You may find more information here:
I hope that helps. Let me know if you need anything else.
Regards,
Miguel