Hello Del,
In addition to my previous mail, another way you can achieve this is by configuring your Wazuh manager to receive syslog events from the syslog server. First of all, you'll need to include the below sample block of configuration on your Wazuh server's
/var/ossec/etc/ossec.conf and restart the Wazuh manager service
systemctl restart wazuh-manager for the configuration to be applied.
<remote>
<connection>syslog</connection>
<port>514</port>
<protocol>udp</protocol>
<allowed-ips>10.0.0.0/24</allowed-ips>
<local_ip>10.0.0.1</local_ip>
</remote>Then on your syslog server, configure the file
/etc/rsyslog.conf and add the IP address of the Wazuh manager server which will indicate to which server the messages will be sent. For example, let's say that the Wazuh manager IP address is 10.0.0.1 where the port is 514 via UDP:
*.* @10.0.0.1:514Add the below configuration to send a message via TCP:
*.* @@10.0.0.1:514The configuration files found in
/etc/rsyslog.d determine which messages will be sent. If you want to forward a specific log file, you can create a configuration file in this folder. This file must have the extension .conf. Now add the following configuration to this file:
$ModLoad imfile
$InputFileName /var/log/program_file.log
$InputFileTag my_program
$InputFileStateFile program_file
$InputFileSeverity info
$InputRunFileMonitorFinally you'll need to restart the Rsyslog service to apply changes:
- systemctl restart rsyslog
You can also check the below link for more information on how to go about the configuration:
I hope this helps. If you have any other query, do not hesitate to ask.
Best regards.