Wazuh indexer
Wazuh 5.x introduces changes to the Wazuh indexer cluster configuration, security settings, and index management. Deploy a new Wazuh indexer and recreate the supported configuration and security settings from the Wazuh 4.x deployment.
You can recreate the following Wazuh indexer configuration and security settings in Wazuh 5.x:
Cluster and node configuration
TLS certificates
Security configuration
Internal users
Roles and role mappings
External authentication providers, including LDAP, Active Directory, SAML, JWT, Kerberos, and client-certificate authentication
You can migrate Wazuh index data from the existing Wazuh 4.x indexer to the Wazuh 5.x indexer using snapshots. The migration requires a snapshot repository that is accessible to the source and destination Wazuh indexer clusters. The following sections describe how to recreate the Wazuh indexer configuration and security settings and migrate the required index data.
Wazuh indexer configuration
Wazuh indexer 5.x stores its configuration under /etc/wazuh-indexer/. The following configuration files and directories are commonly reviewed during the migration.
Path |
Purpose |
|---|---|
|
Main cluster and node configuration |
|
JVM heap and garbage collection settings |
|
Logging configuration |
|
Transport and HTTP TLS certificates |
|
Security plugin configuration |
Note
Do not copy configuration files from a 4.x deployment directly into a 5.x deployment. Use the 4.x configuration as a reference and recreate the required settings manually in the corresponding 5.x files.
Migrate the Wazuh indexer configuration
Perform the following steps on the new Wazuh 5.x endpoint.
Stop the Wazuh indexer service:
# systemctl stop wazuh-indexer
Review the Wazuh 4.x configuration and recreate the required settings manually in the corresponding Wazuh 5.x files.
Review any custom JVM and logging configuration before you apply it to the Wazuh 5.x deployment.
Complete the security configuration described in the Wazuh indexer security configuration section.
Start the Wazuh indexer service:
# systemctl start wazuh-indexer
Verify that the node joins the cluster.
$ curl -k -u <USERNAME>:<PASSWORD> \ https://<WAZUH_INDEXER_IP>:9200/_cat/nodes?v
Where:
<USERNAME>: is the username of a Wazuh indexer user with permissions to query the cluster.<PASSWORD>: is the password of the specified Wazuh indexer user.<WAZUH_INDEXER_IP>: is the IP address or hostname of a Wazuh indexer node in the Wazuh 5.x cluster.
Note
The default credentials for the Wazuh indexer are
admin:admin.
Wazuh indexer security configuration
The Wazuh indexer security configuration controls authentication, authorization, user management, and access permissions.
During the migration, review the existing Wazuh 4.x security configuration and recreate the required users, roles, role mappings, authentication providers, and security settings manually in the corresponding Wazuh 5.x files.
The security configuration is stored under /etc/wazuh-indexer/opensearch-security/.
File |
Purpose |
|---|---|
|
Authentication and authorization configuration |
|
Internal user accounts |
|
Role definitions |
|
Role mappings |
|
Permission groups |
|
Dashboard tenants |
|
Allowed node certificate identities |
|
Restricted API access configuration |
|
Audit logging configuration |
Note
Before migrating the security settings, use the backup procedure to export the active Wazuh 4.x security configuration. The files on disk might not reflect the active configuration because the effective security configuration is stored in the Wazuh indexer security index.
Before applying the recreated security configuration, verify that the recreated roles reference valid permissions and that the role mappings reference users and roles defined in the Wazuh 5.x security configuration. Refer to the user administration documentation for more information.
Apply the security configuration
After you recreate the required security configuration, apply the changes to the Wazuh indexer.
Restart the Wazuh indexer service:
# systemctl restart wazuh-indexer
Apply the security configuration:
# /usr/share/wazuh-indexer/bin/indexer-security-init.shWarning
Running
indexer-security-init.shloads the security configuration from/etc/wazuh-indexer/opensearch-security/into the Wazuh indexer security index. This can overwrite security settings previously configured through the Wazuh dashboard or security API. Ensure that the configuration files contain the security settings you want to retain before running the script.Verify that authentication works. Log in to the Wazuh dashboard and confirm that users can authenticate and access the resources their assigned roles permit.
Indexer data migration
You can migrate Wazuh indices from the Wazuh 4.x indexer to the Wazuh 5.x indexer using snapshots. The migration requires a snapshot repository that is accessible to both the source and destination Wazuh indexer clusters. When restored on the destination Wazuh indexer, the indices retain their indexed data and original timestamps.
The restored indices remain separate from the Wazuh 5.x indices and data streams created for new data. You can create an index pattern for the restored indices to search and analyze historical data from the Discover page on the Wazuh dashboard.
Note
Restored indices retain their Wazuh 4.x mappings and remain separate from the Wazuh 5.x data schema. Wazuh 5.x does not write new data to the restored indices.
The following sections describe the steps required to migrate Wazuh indices from the Wazuh 4.x indexer to the Wazuh 5.x indexer.
Note
Index data migration to Wazuh 5.x requires the source deployment to run Wazuh 4.4.0 or later due to snapshot compatibility requirements.