Setting up a Central Syslog Server to listen on both TCP and UDP ports
This document (000020554) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise 15 SP3
Situation
Using legacy syntax would fail on SLES 15 SP2 and SP3. Example of legacy syntax when editing the /etc/rsyslog.d/remote.conf file.
TCP Example:
$ModLoad imtcp.so
$UDPServerAddress IP
$InputTCPServerRun PORT
UDP Example
$ModLoad imudp.so
$UDPServerAddress IP
$UDPServerRun PORT
Resolution
Modify /etc/rsyslog.d/remote.conf with the following entries.
#TCP Example:
module(load="imtcp") # needs to be done just once
input(type="imtcp" port="514" address="192.168.86.232")
#UDP Example:
module(load="imudp") # needs to be done just once
input(type="imudp" port="514" address="192.168.86.232")
2. Copy /usr/lib/systemd/system/rsyslog.service to /etc/systemd/system/
3. Make sure the unit section of /etc/systemd/system/rsyslog.service has these two lines:
Wants=network.target network-online.target
After=network.target network-online.target
4. Run systemctl restart rsyslog.service
Additional Information
https://documentation.suse.com/sles/15-SP2/html/SLES-all/cha-tuning-syslog.html#sec-tuning-syslog-server
https://documentation.suse.com/sles/15-SP3/single-html/SLES-tuning/#sec-tuning-syslog-server
The upstream documentation for imtcp is here:
https://www.rsyslog.com/doc/master/configuration/modules/imtcp.html
The upstream documentation for imudp is here:
https://www.rsyslog.com/doc/master/configuration/modules/imudp.html
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020554
- Creation Date: 21-Jan-2022
- Modified Date:18-Nov-2022
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com