Use imjournal for rsyslogd instead of sharing /dev/log with journal (#1369439)
Resolves: rhbz#1369439 Rsyslogd used to read messages from /dev/log together with systemd-journald which resulted in NetworkManager messages not being passed to syslog due to a race condition during starting NetworkManager and rsyslogd service. So use imjournal rsyslog plugin that picks messages from journald instead of using the /dev/log socket. Same as regular RHEL 7 system.
This commit is contained in:
parent
492ab9e4a5
commit
3eca8a0425
@ -1,7 +1,24 @@
|
||||
# rsyslog configuration file
|
||||
|
||||
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
|
||||
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
|
||||
|
||||
#### MODULES ####
|
||||
$ModLoad imuxsock.so # provides support for local system logging
|
||||
|
||||
# The imjournal module bellow is now used as a message source instead of imuxsock.
|
||||
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
|
||||
$SystemLogRateLimitInterval 0 # disables message dropping, we need all of them
|
||||
$ModLoad imklog.so # provides kernel logging support
|
||||
$ModLoad imjournal # provides access to the systemd journal
|
||||
$ModLoad imklog # reads kernel messages (the same are read from journald)
|
||||
#$ModLoad immark # provides --MARK-- message capability
|
||||
|
||||
# Provides UDP syslog reception
|
||||
#$ModLoad imudp
|
||||
#$UDPServerRun 514
|
||||
|
||||
# Provides TCP syslog reception
|
||||
#$ModLoad imtcp
|
||||
#$InputTCPServerRun 514
|
||||
|
||||
$ModLoad imfile
|
||||
$InputFileName /tmp/X.log
|
||||
@ -15,10 +32,29 @@ $InputFileStateFile anaconda-tb-statefile
|
||||
$InputFileFacility local1
|
||||
$InputRunFileMonitor
|
||||
|
||||
|
||||
#### GLOBAL DIRECTIVES ####
|
||||
|
||||
# Where to place auxiliary files
|
||||
#$WorkDirectory /var/lib/rsyslog
|
||||
|
||||
# Use default timestamp format
|
||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||
|
||||
# File syncing capability is disabled by default. This feature is usually not required,
|
||||
# not useful and an extreme performance hit
|
||||
#$ActionFileEnableSync on
|
||||
|
||||
# Include all config files in /etc/rsyslog.d/
|
||||
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||
|
||||
# Turn off message reception via local log socket;
|
||||
# local messages are retrieved through imjournal now.
|
||||
$OmitLocalLogging on
|
||||
|
||||
# File to store the position in the journal
|
||||
$IMJournalStateFile imjournal.state
|
||||
|
||||
#### TEMPLATES ####
|
||||
|
||||
$template anaconda_tty4, "%syslogseverity-text:::uppercase% %programname%:%msg%\n"
|
||||
@ -26,24 +62,29 @@ $template anaconda_syslog, "%timestamp:8:$:date-rfc3164%,%timestamp:1:3:date-sub
|
||||
$template virtio_ForwardFormat, "<%PRI%>%TIMESTAMP:::date-rfc3339% localhost %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%\n"
|
||||
|
||||
#### RULES ####
|
||||
|
||||
# log everything except anaconda-specific records from local1 (those are stored
|
||||
# directly into files via python logging)
|
||||
|
||||
*.*;\
|
||||
authpriv.none;\
|
||||
local1.none /tmp/syslog;anaconda_syslog
|
||||
& /dev/tty4;anaconda_tty4
|
||||
|
||||
|
||||
# ### begin forwarding rule ###
|
||||
# The statement between the begin ... end define a SINGLE forwarding
|
||||
# rule. They belong together, do NOT split them. If you create multiple
|
||||
# forwarding rules, duplicate the whole block!
|
||||
# Remote Logging (we use TCP for reliable delivery)
|
||||
#
|
||||
# An on-disk queue is created for this action. If the remote host is
|
||||
# down, messages are spooled to disk and sent when it is up again.
|
||||
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
|
||||
$ActionQueueMaxDiskSpace 1m # space limit (use as much as possible)
|
||||
$ActionQueueSaveOnShutdown off # do not save messages to disk on shutdown
|
||||
$ActionQueueType LinkedList # run asynchronously
|
||||
$ActionResumeRetryCount -1 # infinite retries if host is down
|
||||
#$ActionQueueType LinkedList # run asynchronously
|
||||
#$ActionResumeRetryCount -1 # infinite retries if host is down
|
||||
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
|
||||
#*.* @@remote-host:514
|
||||
# ### end of the forwarding rule ###
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user