Hello team!
Thanks for contacting us.
To help you solve this problem you will need to answer the following
questions, so I can have more information about what is happening.
- What type of environment are you using? Do you have one manager or several?
- How do you deduce that Syslog stops working?
- Can you attach the ossec.log file data for both the manager and the agent?
Remember that to configure Remote Syslog you will have to add the following configuration block to the /var/ossec/etc/ossec.conf file of your wazuh-manager (replacing PORT, PROTOCOL and X.X.X.X/X with your corresponding information).
<remote>
<connection>syslog</connection>
<port>PORT</port>
<protocol>PROTOCOL</protocol>
<allowed-ips>X.X.X.X/X</allowed-ips>
</remote>
After this, you will have to restart the wazuh-manager:
systemctl restart wazuh-manager
If the configuration is correct, by typing the command:
netstat -tunap | grep wazuh
You can check that the connection for that port and protocol has been opened (in my case 513/TCP to listen remote syslog).
# netstat -tunap | grep wazuh
2665/wazuh-remoted
2664/wazuh-remoted
2557/wazuh-authd
Remote syslog is working now under wazuh-remoted
Then you will need to send the logs/events through remote syslog using the specified port and protocol.
If you want to check if the manager is receiving the events, you can activate the event logging of the manager and see all the events received (temporarily to avoid unnecessary disk usage and storage).
To do this, edit the /var/ossec/etc/ossec.conf configuration file of your wazuh-manager and change:
<logall>no</logall>
to
<logall>yes</logall>.
After this, you will have to restart the wazuh-manager.
systemctl restart wazuh-manager
And from now on all received events will be stored in the /var/ossec/logs/archives/archives.log file.
You can search here for new events/logs that you send via remote syslog or use commands like:
tail -f /var/ossec/logs/archives/archives.log
To see the events received in real-time.
- In case you receive the events, Wazuh has a default Check Point decoder and rule. You may need to create decoders and/or rules to generate the alerts according to your needs.
- In case you do not receive the events, check that you have connectivity between your devices and the wazuh-manager by the established port and protocol. Check that there is no firewall or configuration blocking that port.
Regards.