Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing step to apply shards configuration #6946

Closed
juliamagan opened this issue Jan 12, 2024 · 3 comments · Fixed by #6958
Closed

Missing step to apply shards configuration #6946

juliamagan opened this issue Jan 12, 2024 · 3 comments · Fixed by #6958
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@juliamagan
Copy link
Member

Description

During the tests carried out in wazuh/wazuh#21365, it was found that a step is missing in the documentation to apply the shards configuration. In this part of the documentation it is indicated that shards should be modified for single node:
image

A few steps later it checks it:

image

However, the configuration is not applied if the following command is not executed:

filebeat setup --index-management
@davidjiglesias
Copy link
Member

I think we should also review Sources installation

@AlexRuiz7
Copy link
Member

Although it looks like a simple change in the documentation, it's slightly complex as we need to think about it together with the ISM rollover + alias feature added also in version 4.8.0.

I believe it does not interfere, but depending on the sequence of steps given to the user during installation, the changes won't take effect until new indices are created, in other words, until the ISM policy rotates the indices.

Let's take a brief look at the installation process:

  1. wazuh-indexer installation: the initialization script uploads the wazuh-template.json (as present in wazuh/wazuh) along with other indices templates and ISM configuration. As a result, 2 initial indices are created, configured and aliased, so Filebeat can write to them straightaway (wazuh-alerts and wazuh-archives).
  2. wazuh-server and Filebeat installation: as the wazuh-template.json is being uploaded by the wazuh-indexer initialization script, it's not needed to upload it using Filebeat anymore. It was decided with the CTO not to remove these steps from the documentation yet to avoid confusing the users. As a result, the wazuh-template.json is uploaded twice, with identical content. In case of modifying the Filebeat's template, the changes won't take effect until running the command filebeat setup --index-management AND new indices are created (remember that the initialization of wazuh-indexer creates the initial indices).

The modification of the number of shards is only indicated in the offline installation. Neither in the step-by-step nor in the assisted installation is it indicated to modify the template. Moreover, as the command filebeat setup --index-management has been missing, this step has never been effective: it has never worked.

Having said so, the best solution in my opinion would be to migrate this step to the wazuh-indexer installation process, so the initial indices and the wazuh-template are created properly from the very beginning, but, as we plan to update the documentation in the future to remove the upload of the template using Filebeat, it would be better to simply wait until then (in other words, tag this issue as a known bug), or remove this step from the offline installation.

@wazuhci wazuhci moved this from Triage to Blocked in Release 4.8.0 Jan 15, 2024
@davidjiglesias
Copy link
Member

Please remove the step from the offline installation if it is causing problems. We still support it.

@AlexRuiz7 AlexRuiz7 self-assigned this Jan 16, 2024
@wazuhci wazuhci moved this from Blocked to In progress in Release 4.8.0 Jan 16, 2024
@wazuhci wazuhci moved this from In progress to Pending final review in Release 4.8.0 Jan 16, 2024
@wazuhci wazuhci moved this from Pending final review to Done in Release 4.8.0 Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants