Hello Udi:
I hope you are fine.
By default the wazuh-manager is installed in the /var directory under the ossec/ directory created during the installation. The logs are stored in /var/ossec/logs directory and they are rotated and compressed on a daily basis. It is also possible to install the wazuh-manager in another directory using the installation from sources described in the following document:
However, if you need to change the location after the installation, you can create a symbolic link to point to another Filesystem.
# cp -rp /var/ossec/* /data/wazuh
# rm -rf /var/ossec
# ln -s /data/wazuh /var/ossec
It is recommended to stop the wazuh-manager service before doing the mentioned change:
# systemctl stop wazuh-manager
Regarding the wazuh-indexer and wazuh-dashboard installations, different directories are used. For instance:
- /usr/share/ for binaries and some configurations
- /etc for main configurations and certificates
- /var for data and logs storage (wazuh-indexer)
The disk space in this last folder is critical because it stores all the indices data without compression
The location of the data and logs can also be modified in the wazuh-indexer. For instance:
1) Create new directories for data and logs and change ownership:
# mkdir /opt/lib/wazuh-indexer
# mkdir /opt/lib/wazuh-indexer
# chown -R wazuh-indexer:wazuh-indexer /opt/lib/wazuh-indexer
# chown -R wazuh-indexer:wazuh-indexer /opt/lib/wazuh-indexer
2) Change the configration of th wazuh-indexer:
# vi /etc/wazuh-indexer/opensearch.yml
...
path.data: /opt/lib/wazuh-indexer
path.logs: /opt/log/wazuh-indexer
...
3) Restart the wazuh-indexer to load the changes:
# systemctl restart wazuh-indexer