Answer the question
In order to leave comments, you need to log in
How to collect logs from multiple files using rsyslog?
There are several log files on the server - app1.log, app2.log ...
I want to collect them into one file using rsyslog, with the aim of sending them to a remote server for collecting and analyzing logs in the future.
I do so.
/etc/rsyslog.conf
module(load="imfile")
input(type="imfile"
File="/apps/app1.log"
Facility="local7"
Severity="notice")
input(type="imfile"
File="/apps/app2.log"
Facility="local7"
Severity="notice")
local7.notice -/var/log/apps.log
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question