From
Forwarding to More than One Server;
What is important to know, however, is that the full set of directives make up an action. So you can not simply add (just) a second forwarding rule, but need to duplicate the rule configuration as well. Be careful that you use different queue file names for the second action, else you will mess up your system.
So, actually, you have to use 2 different local queues.
Configure a working directory.
$WorkDirectory /var/spool/rsyslog
Configure your forwarding rules (obsolete legacy
format).
$ActionQueueType LinkedList
$ActionQueueFileName Forward1
$ActionResumeRetryCount -1
$ActionQueueSaveOnShutdown on
*.* @@server1
$ActionQueueType LinkedList
$ActionQueueFileName Forward2
$ActionResumeRetryCount -1
$ActionQueueSaveOnShutdown on
*.* @@server2
Configure your forwarding rules (new advanced
format).
action(type="omfwd" target="server1" resumeRetryCount="-1"
queue.type="LinkedList" queue.filename="Forward1" queue.saveOnShutdown="on")
action(type="omfwd" target="server2" resumeRetryCount="-1"
queue.type="LinkedList" queue.filename="Forward2" queue.saveOnShutdown="on")