That said, I'd like to set up rsyslog forwarding in a single file rather than in each file. For example in a 001_destination.addresses.conf, which would theoretically be the first file read out of the .d dir.
Here are examples of my not too bright .conf files. The first is forwarding all in rsyslog.conf, and the second is one of many files forwarded.
Code: Select all
$WorkDirectory /var/lib/rsyslog # Where spool files will live
$ActionQueueFileName nlsFwdRule0 # 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 # Use asynchronous processing
$ActionResumeRetryCount -1 # Infinite retries if host is down
*.* @@[2001:4888:a05:3154:e0:ff2:0:b01]:5544 # *.*: send everything in rsyslog.conf, @@: use TCP
$ActionExecOnlyWhenPreviousIsSuspended on # If the 1st log server is down send to the next, etc.
& @@[2001:4888:a05:3154:e0:ff2:0:b02]:5544
& @@[2001:4888:a05:3154:e0:ff2:0:b03]:5544
$ActionExecOnlyWhenPreviousIsSuspended off
Code: Select all
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$WorkDirectory /var/lib/rsyslog
$InputFileName /var/log/mcs/tomcat01/tc_wi_task.out
$InputFileTag tc_wi_task.out
$InputFileStateFile nls-state-tc_wi_task.out
$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
if $programname == 'tc_wi_task.out' then @@[2001:4888:a05:3154:e0:ff2:0:b01]:5544
$ActionExecOnlyWhenPreviousIsSuspended on
& @@[2001:4888:a05:3154:e0:ff2:0:b02]:5544
& @@[2001:4888:a05:3154:e0:ff2:0:b03]:5544
$ActionExecOnlyWhenPreviousIsSuspended off
if $programname == 'tc_wi_task.out' then stop