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