naccyde / rpms / systemd

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