[rsyslog] Switch the local message source from imuxsock to imjournal
Tomas Heinrich
theinric at fedoraproject.org
Tue Jun 4 19:12:29 UTC 2013
commit d9d32ce25550a913ded1c22a18118deb8dcf1fec
Author: Tomas Heinrich <theinric at redhat.com>
Date: Tue Jun 4 20:18:19 2013 +0200
Switch the local message source from imuxsock to imjournal
The imuxsock module is left enabled so it is easy to swich back to it
and because systemd drops a file into /etc/rsyslog.d which only
imuxsock can parse.
rsyslog.conf | 13 ++++++++++++-
rsyslog.spec | 10 ++++++++--
2 files changed, 20 insertions(+), 3 deletions(-)
---
diff --git a/rsyslog.conf b/rsyslog.conf
index dfdc28d..2e2dd90 100644
--- a/rsyslog.conf
+++ b/rsyslog.conf
@@ -5,7 +5,9 @@
#### MODULES ####
+# 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)
+$ModLoad imjournal # provides access to the systemd journal
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
@@ -20,6 +22,9 @@ $ModLoad imklog # provides kernel logging support (previously done by rklogd)
#### GLOBAL DIRECTIVES ####
+# Where to place auxiliary files
+$WorkDirectory /var/lib/rsyslog
+
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
@@ -30,6 +35,13 @@ $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# 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
+$StateFile imjournal.state
+
#### RULES ####
@@ -69,7 +81,6 @@ local7.* /var/log/boot.log
#
# 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.
-#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
diff --git a/rsyslog.spec b/rsyslog.spec
index df52dec..42d7c9d 100644
--- a/rsyslog.spec
+++ b/rsyslog.spec
@@ -321,8 +321,10 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rsyslog.conf
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog
install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog
-#get rid of *.la
-rm %{buildroot}%{_libdir}/rsyslog/*.la
+# get rid of *.la
+rm -f %{buildroot}%{_libdir}/rsyslog/*.la
+# get rid of socket activation by default
+sed -i '/^Sockets/s/^/;/;/^Alias/s/^/;/' %{buildroot}%{_unitdir}/rsyslog.service
%post
for n in /var/log/{messages,secure,maillog,spooler}
@@ -479,6 +481,10 @@ done
- drop the option for backwards compatibility from the
sysconfig file - it is no longer supported
- call autoreconf to prepare the snapshot for building
+- switch the local message source from imuxsock to imjournal
+ the imuxsock module is left enabled so it is easy to swich back to
+ it and because systemd drops a file into /etc/rsyslog.d which only
+ imuxsock can parse
* Wed Apr 10 2013 Tomas Heinrich <theinric at redhat.com> 7.3.10-1
- rebase to 7.3.10
More information about the scm-commits
mailing list