Hi,
I want to use the logstash syslog output plugin (Syslog output plugin | Logstash Reference [8.11] | Elastic) to send specific logs to a remote host.
It doesn't work if I configure the output to send to the remote host directly, can't figure out why (remote site isn't under my control).
So I tried to send to a local rsyslog instance, which then should forward the logs to the remote host.
For that I want to set "facility => local5" in the output configuration, and let rsyslog forward everything with local5.* to the remote site.
But nothing gets send out. Only when I tell rsyslog to send everything ( *.* ) it works.
Configs look like this:
logstash:
output { syslog { host => "localhost" port => "5141" protocol => "tcp" facility => "local5" severity => "informational" } }
rsyslog:
$ModLoad imuxsock # local message reception $WorkDirectory /var/log/rsyslog/ # default location for work (spool) files $ActionQueueType LinkedList # use asynchronous processing $ActionQueueFileName srvrfwd # set file name, also enables disk mode $ActionResumeRetryCount -1 # infinite retries on insert failure $ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
# this does not work: # local5.* @@remotehost.tld:443 # this works: *.* @@remotehost.tld:443
So I suspect that the facility doesn't get set correctly.
Any ideas?