Skip to content

Commit

Permalink
rsyslog.conf: Update to use current config syntax
Browse files Browse the repository at this point in the history
This commit switches to using the rewritten config file from the
upstream templates. This fixes the problem with writing the state file
to the workDirectory and uses modern syntax.

Resolves: RHEL-46857
  • Loading branch information
bcl committed Jul 10, 2024
1 parent bbfaf42 commit 37af69f
Showing 1 changed file with 30 additions and 49 deletions.
79 changes: 30 additions & 49 deletions share/templates.d/99-generic/config_files/common/rsyslog.conf
Original file line number Diff line number Diff line change
@@ -1,62 +1,43 @@
# rsyslog configuration file
# minimal rsyslog configuration file for the installer boot.iso

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####
# provides support for local system logging (e.g. via logger command)
# disables message dropping, we need all of them
# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
module(load="imuxsock"
SysSock.RateLimit.Interval="0"
SysSock.Use="off")

# The imjournal module below 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 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 access to the systemd journal
# Disable rate limiting to the journal, we need all the messages for debugging
$imjournalRatelimitInterval 0
$imjournalRatelimitBurst 0

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514

$ModLoad imfile
$InputFileName /tmp/X.log
$InputFileTag xserver:
$InputFileStateFile xserver-statefile
$InputFileFacility local1
$InputRunFileMonitor
$InputFileName /tmp/anaconda-tb-all.log
$InputFileTag anaconda-tb:
$InputFileStateFile anaconda-tb-statefile
$InputFileFacility local1
$InputRunFileMonitor
module(load="imjournal"
Ratelimit.Interval="0"
Ratelimit.Burst="0"
StateFile="imjournal.state")

module(load="imfile" mode="inotify")
input(type="imfile"
File="/tmp/X.log"
Tag="xserver:"
Facility="local1")

#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog
input(type="imfile"
File="/tmp/anaconda-tb-all.log"
Tag="anaconda-tb:"
Facility="local1")

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
module(load="builtin:omfile"
Template="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
#### GLOBAL DIRECTIVES ####

# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on
# Where to place auxiliary files
global(workDirectory="/var/lib/rsyslog")

# File to store the position in the journal
$IMJournalStateFile imjournal.state
# Include all config files in /etc/rsyslog.d/
include(file="/etc/rsyslog.d/*.conf")

#### TEMPLATES ####

Expand Down

0 comments on commit 37af69f

Please sign in to comment.