Hi there,
Thank you for using Wazuh.
This problem of
ERROR 401 Unauthorized: Unauthorized is because the user or password of Elasticsearch does not match with the user or password in the file
/etc/filebeat/filebeat.ymlThe
filebeat.yml file contains something like this:
# Wazuh - Filebeat configuration file
output.elasticsearch:
hosts: ["127.0.0.1:9200"]
protocol: https
username: "your_username"
password: "your_password"
ssl.certificate_authorities:
- /etc/filebeat/certs/root-ca.pem
ssl.certificate: "/etc/filebeat/certs/filebeat.pem"
ssl.key: "/etc/filebeat/certs/filebeat-key.pem"
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
setup.template.json.name: 'wazuh'
setup.ilm.overwrite: true
setup.ilm.enabled: false
filebeat.modules:
- module: wazuh
alerts:
enabled: true
archives:
enabled: false
And run the following command:
bash wazuh-passwords-tool.sh -u your_username -p your_password
Where you have to complete
your_username and
your_password as it says in the
filebeat.yml file.
Here you have the official documentation of Elasticsearch Tuning.
After this, you can run the command:
filebeat test output
and check the correct output.
I hope this information can solve your problem.
Regards