Table of Contents

Install OS and Packages

https://github.com/syslog-ng/syslog-ng/issues/2667
You may need to fix syslog-ng's systemd service file as it fails to start after a reboot because the network isn't ready.

sudo vim /usr/lib/systemd/system/syslog-ng.service

Add the following under [Unit]

Wants=network.target network-online.target
After=network.target network-online.target

Reload the deamon

sudo systemctl daemon-reload

Configure syslog-ng to receive logs

https://www.linuxjournal.com/content/creating-centralized-syslog-server
https://community.spiceworks.com/topic/2084362-syslog-ng-for-multiple-sources
https://www.rfaircloth.com/tags/syslog-ng/
https://lists.balabit.hu/pipermail/syslog-ng/2014-March/021290.html
http://monitoringartist.github.io/community.zenoss.org/message/48987.html

SELinux Steps

If you need to use non-standard ports or need to troubleshoot or use semanage to make a rule here is an example of what to do:

sudo dnf install policycoreutils-python
sudo semanage port -a -t syslogd_port_t -p tcp 8100
sudo semanage port -a -t syslogd_port_t -p udp 8100
sudo semanage fcontext -a -t var_log_t /var/splunk-syslog
sudo restorecon -v '/var/splunk-syslog'
sudo logger -d -P 8100 -n 127.0.0.1 -p 1 "test2"
sudo cd /root
sudo mkdir selinux
sudo cd selinux
sudo audit2allow -M syslog-ng-modified -l -i /var/log/audit/audit.log
#verify the file does not contain anything no related to syslog
sudo vim syslog-ng-modified.te
sudo semodule -i syslog-ng-modified.pp

Logrotate

http://danielsokolowski.blogspot.com/2012/09/maximum-logrotate-compression-with-bzip2.html

Note: Logrotate runs once daily by default, if your logs are getting too big before days end then you'll want to increase the frequency that logrotate runs.