Hello Yari,
1. How i can know if the manager is receiving the logs?
You have to check that port 1514 is opened between the source device and Wazuh server. You can run the below tcpdump command on Wazuh manager, to be sure that events are being received by Wazuh:
# tcpdump -i any port 1514 host <IP_ADDRESS>
If the tcpdump command returns logs from your device, but no alerts on your Wazuh dashboard, you need to enable the Wazuh archives and create and index pattern to visualize the events.
2. How i can display the logs in opensearch dashboard?
As mentioned in my previous answer, you need to enable the Wazuh archives, create an index pattern and use the Discover tab to view all events.
- The first step is to enable the logging of all events, which can be done by changing the value of the parameters <logall> and/or <logall_json> to yes in the Wazuh server configuration file /var/ossec/etc/ossec.conf.
Note: Only the <logall_json>yes</logall_json> creates an index that can be used to visualize the events on the Wazuh dashboard.
- Then, Restart the Wazuh manager to apply the configuration changes:
# systemctl restart wazuh-manager
Depending on your chosen format, the file archives.log, archives.json, or both will be created in the /var/ossec/logs/archives/ directory on the Wazuh server.
In order to view and query the events stored in the Wazuh archives, perform the following steps:
On the Wazuh server:
- Edit the Filebeat configuration file /etc/filebeat/filebeat.yml and change the value of archives: enabled from false to true. It should look as follows:
archives:
enabled: true
- Restart Filebeat service to apply the configuration changes:
# systemctl restart filebeat
On the Wazuh Dashboard:
- Click the upper-left menu icon and navigate to Stack management -> Index patterns -> Create index pattern. Use wazuh-archives-* as the index pattern name, and set @timestamp in the Time field drop-down list and save.
- To view the events, click the upper-left menu icon and navigate to Discover. Change the index pattern to wazuh-archives-*. This will allow you to have an overview of all events generated in your infrastructure, even those that did not trigger an alert.
I hope you find this helpful.