-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rsyslog: Debian forward only logging. journald takes care of the rest
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This rsyslog configuration takes logs from journald and forwards them to a remote log serverad="imuxsock") # provides support for local system logging | ||
module(load="imklog") # provides kernel logging support | ||
module(load="immark" | ||
MarkMessagePeriod="600" | ||
) # provides --MARK-- message capability | ||
module(load="imjournal" | ||
PersistStateInterval="100" | ||
StateFile="/var/spool/rsyslog/imjournal.state" | ||
ratelimit.interval="30" | ||
ratelimit.burst="20000" ) # Reads journald logs | ||
|
||
$PreserveFQDN on | ||
|
||
$WorkDirectory /var/spool/rsyslog | ||
$IncludeConfig /etc/rsyslog.d/*.conf | ||
*.emerg :omusrmsg:* | ||
|
||
{% if rsyslog_remote_server_relp is defined and 'sysloghost' not in group_names %} | ||
# Forward all logs to the central logging server using relp | ||
module(load="omrelp") | ||
action(type="omrelp" | ||
target="{{ rsyslog_remote_server_relp }}" | ||
port="{{ rsyslog_remote_relp_port }}" | ||
tls="on" | ||
tls.caCert="/etc/pki/rsyslog/rsyslogclientca.crt" | ||
tls.MyCert="/etc/pki/rsyslog/rsyslogclient.crt" | ||
tls.MyPrivKey="/etc/pki/rsyslog/rsyslogclient.key" | ||
tls.authmode="name" | ||
tls.permittedpeer=["{{ rsyslog_remote_server_relp }}"] | ||
queue.type="LinkedList" | ||
queue.filename="rsyslog_relp_q" | ||
queue.maxdiskspace="1G" | ||
queue.saveonshutdown="on" | ||
action.resumeRetryCount="-1" | ||
action.resumeInterval="5" | ||
action.writeAllMarkMessages="on") | ||
{% endif %} |