1. Uncomment the remote host line and add the remote server's IP address in /etc/rsyslog.conf:
Change
to
Code:
*.* @@<remote_host_IP_address>:514
2. Make sure the remote syslog host is configured to allow in port 514 from your cPanel server.
3. Restart rsyslogd on your cPanel server with "/scripts/restartsrv_rsyslogd".
Once you have verified that remote syslog is working, you may wish to adjust some of the forwarding parameters that appear in this section of /etc/rsyslogd.conf:
# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###