Hi Tuaans Anh,
Can you attach the image in the attachment? It is image is not visible in the mail.
If you are getting this error: [API connection] No API available to connect.
When restarting the manager, the Wazuh API will wait until the Wazuh manager's modules are ready and the Wazuh Dashboard needs the Wazuh API to retrieve the status of the system as well as allowing you to modify the configuration from the web interface.
You may temporarily receive the error you're seeing under normal circumstances after a restart and retrying may resolve it.
Also, you can try this workaround.
At the end of this configuration file
/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml
hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
Try changing the
url: https://localhost
to
url: https://127.0.0.1
And restart the manager.
systemctl restart wazuh-manager
If you need further assistance on this please share the error screenshot in the attachment.
Let me know the update on the issue.
This URL contains the IP address of the Wazuh manager. Typically it is an all-in-one deployment. Depleyeded by the assistance or following quickstart it is the localhost.
url: https://<WAZUH_SERVER_IP_ADDRESS>
If it is a distributed deployment the ip is the Wazuh manager's ip.
I was wondering why the host section is empty in your screenshot.
What was the initial configuration on the IP?
Recheck the API configuration from /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml
Restart the Wazuh dashboard
Run this command from your dashboard server and chcek if you can make API request
curl -k -X GET "https://<IP_address>:55000/agents" -H "Authorization: Bearer $(curl -u wazuh-wui:<password> -k -X GET 'https://<IP_address>:55000/security/user/authenticate?raw=true')"
Use the IP, username, and password same as the wazuh.yml file
After restarting the Dashboard Clear your browser cache and cookies and try to access the server again.
Looking forward to your update on the issue.