You can configure the publication of events in CEF format to an external SIEM system, and saving the events locally in log files on the server. If you do not need to save events locally, skip steps 5, 7, 8 of the instructions in this section.
Follow the steps below on each cluster node whose events you want to publish to a SIEM system. Only enable the export of events in CEF format after configuring event publishing.
To configure the publication of application events to a SIEM system:
systemctl status rsyslog
The status of the service must be running.
If the rsyslog service is not running or is not installed, install and enable the rsyslog service in accordance with the instructions from the documentation for your operating system.
$ActionQueueFileName ForwardToSIEM
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1
<category (facility) for the CEF format>.* @<IP address of the SIEM system>:<port used by the SIEM system to receive messages from Syslog over UDP>
If you want to send events over TCP, add the following line:
<category (facility) for the CEF format>.* @@<IP address of the SIEM system>:<port used by the SIEM system to receive messages from Syslog over TCP>
<facility for the CEF format>.* -/var/log/ksmg-cef-messages
<facility for the CEF format>.* stop
Example configuration file for exporting over UDP without saving to the local log: $ActionQueueFileName ForwardToSIEM2 $ActionQueueMaxDiskSpace 1g $ActionQueueSaveOnShutdown on $ActionQueueType LinkedList $ActionResumeRetryCount -1 local2.* @10.16.32.64:514 local2.* stop Example configuration file for exporting over TCP with saving to the local log: $ActionQueueFileName ForwardToSIEM2 $ActionQueueMaxDiskSpace 1g $ActionQueueSaveOnShutdown on $ActionQueueType LinkedList $ActionResumeRetryCount -1 local2.* @@10.16.32.64:514 local2.* -/var/log/ksmg-cef-messages local2.* stop |
touch /var/log/ksmg-cef-messages
chown root:klusers /var/log/ksmg-cef-messages
chmod 640 /var/log/ksmg-cef-messages
/var/log/ksmg-cef-messages
{
size 500M
rotate 10
compress
missingok
notifempty
sharedscripts
postrotate
/usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true
endscript
}
systemctl restart rsyslog
systemctl status rsyslog
The status must be running.
logger -p <category (facility) for the CEF format>.info Test message
Publication of application events to the SIEM system is configured.
Page top