Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

How do you forward logs to a remote syslog server with rsyslog?

IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer
# /etc/rsyslog.d/90-forward.conf
*.* action(type="omfwd" target="logs.internal" port="514" protocol="tcp"
           queue.type="LinkedList" queue.filename="fwdq"
           queue.maxDiskSpace="1g" queue.saveOnShutdown="on"
           action.resumeRetryCount="-1")

The disk-assisted queue buffers messages if the collector is down. Use TCP (or RELP/TLS for reliability and encryption) rather than UDP for anything important.

All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning