naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
803fb7
From 24d007a0a8a77a6b75c6c7a403fc8d107875ebdc Mon Sep 17 00:00:00 2001
803fb7
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
803fb7
Date: Sat, 9 May 2015 16:20:51 -0500
803fb7
Subject: [PATCH] man: document forwarding to syslog better
803fb7
803fb7
https://bugzilla.redhat.com/show_bug.cgi?id=1147651
803fb7
803fb7
Cherry-picked from: 589532d0
803fb7
Resolves: #1177336
803fb7
---
803fb7
 man/journald.conf.xml | 70 ++++++++++++++++++++++++++++++++-------------------
803fb7
 1 file changed, 44 insertions(+), 26 deletions(-)
803fb7
803fb7
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
803fb7
index 85146b0d8..abfe3130d 100644
803fb7
--- a/man/journald.conf.xml
803fb7
+++ b/man/journald.conf.xml
803fb7
@@ -97,7 +97,7 @@
803fb7
         needed, so that its existence controls where log data goes.
803fb7
         <literal>none</literal> turns off all storage, all log data
803fb7
         received will be dropped. Forwarding to other targets, such as
803fb7
-        the console, the kernel log buffer or a syslog daemon will
803fb7
+        the console, the kernel log buffer, or a syslog socket will
803fb7
         still work however. Defaults to
803fb7
         <literal>auto</literal>.</para></listitem>
803fb7
       </varlistentry>
803fb7
@@ -220,27 +220,19 @@
803fb7
         journald will stop using more space, but it will not be
803fb7
         removing existing files to go reduce footprint either.</para>
803fb7
 
803fb7
-        <para><varname>SystemMaxFileSize=</varname>
803fb7
-        and
803fb7
-        <varname>RuntimeMaxFileSize=</varname>
803fb7
-        control how large individual journal
803fb7
-        files may grow at maximum. This
803fb7
-        influences the granularity in which
803fb7
-        disk space is made available through
803fb7
-        rotation, i.e. deletion of historic
803fb7
-        data. Defaults to one eighth of the
803fb7
-        values configured with
803fb7
+        <para><varname>SystemMaxFileSize=</varname> and
803fb7
+        <varname>RuntimeMaxFileSize=</varname> control how large
803fb7
+        individual journal files may grow at maximum. This influences
803fb7
+        the granularity in which disk space is made available through
803fb7
+        rotation, i.e. deletion of historic data. Defaults to one
803fb7
+        eighth of the values configured with
803fb7
         <varname>SystemMaxUse=</varname> and
803fb7
-        <varname>RuntimeMaxUse=</varname>, so
803fb7
-        that usually seven rotated journal
803fb7
-        files are kept as history. Specify
803fb7
-        values in bytes or use K, M, G, T, P,
803fb7
-        E as units for the specified sizes
803fb7
-        (equal to 1024, 1024²,... bytes).
803fb7
-        Note that size limits are enforced
803fb7
-        synchronously when journal files are
803fb7
-        extended, and no explicit rotation
803fb7
-        step triggered by time is
803fb7
+        <varname>RuntimeMaxUse=</varname>, so that usually seven
803fb7
+        rotated journal files are kept as history. Specify values in
803fb7
+        bytes or use K, M, G, T, P, E as units for the specified sizes
803fb7
+        (equal to 1024, 1024²,... bytes).  Note that size limits are
803fb7
+        enforced synchronously when journal files are extended, and no
803fb7
+        explicit rotation step triggered by time is
803fb7
         needed.</para></listitem>
803fb7
       </varlistentry>
803fb7
 
803fb7
@@ -308,13 +300,13 @@
803fb7
         daemon, to the kernel log buffer (kmsg), to the system
803fb7
         console, or sent as wall messages to all logged-in users.
803fb7
         These options take boolean arguments. If forwarding to syslog
803fb7
-        is enabled but no syslog daemon is running, the respective
803fb7
-        option has no effect. By default, only forwarding wall is
803fb7
-        enabled. These settings may be overridden at boot time with
803fb7
-        the kernel command line options
803fb7
+        is enabled but nothing reads messages from the socket,
803fb7
+        forwarding to syslog has no effect. By default, only
803fb7
+        forwarding to wall is enabled. These settings may be
803fb7
+        overridden at boot time with the kernel command line options
803fb7
         <literal>systemd.journald.forward_to_syslog=</literal>,
803fb7
         <literal>systemd.journald.forward_to_kmsg=</literal>,
803fb7
-        <literal>systemd.journald.forward_to_console=</literal> and
803fb7
+        <literal>systemd.journald.forward_to_console=</literal>, and
803fb7
         <literal>systemd.journald.forward_to_wall=</literal>. When
803fb7
         forwarding to the console, the TTY to log to can be changed
803fb7
         with <varname>TTYPath=</varname>, described
803fb7
@@ -365,6 +357,32 @@
803fb7
 
803fb7
   </refsect1>
803fb7
 
803fb7
+  <refsect1>
803fb7
+    <title>Forwarding to traditional syslog daemons</title>
803fb7
+
803fb7
+    <para>
803fb7
+      Journal events can be transfered to a different logging daemon
803fb7
+      in two different ways. In the first method, messages are
803fb7
+      immediately forwarded to a socket
803fb7
+      (<filename>/run/systemd/journal/syslog</filename>), where the
803fb7
+      traditional syslog daemon can read them. This method is
803fb7
+      controlled by <varname>ForwardToSyslog=</varname> option.  In a
803fb7
+      second method, a syslog daemon behaves like a normal journal
803fb7
+      client, and reads messages from the journal files, similarly to
803fb7
+      <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
803fb7
+      In this method, messages do not have to be read immediately,
803fb7
+      which allows a logging daemon which is only started late in boot
803fb7
+      to access all messages since the start of the system. In
803fb7
+      addition, full structured meta-data is available to it. This
803fb7
+      method of course is available only if the messages are stored in
803fb7
+      a journal file at all. So it will work if
803fb7
+      <varname>Storage=none</varname> is set. It should be noted that
803fb7
+      usualy the <emphasis>second</emphasis> method is used by syslog
803fb7
+      daemons, so the <varname>Storage=</varname> option, and not the
803fb7
+      <varname>ForwardToSyslog=</varname> option, is relevant for them.
803fb7
+    </para>
803fb7
+  </refsect1>
803fb7
+
803fb7
   <refsect1>
803fb7
       <title>See Also</title>
803fb7
       <para>