[37de9d1] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
[eb2ad67] | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[37de9d1] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-rsyslog" xreflabel="rsyslog" role="wrap">
|
---|
| 9 | <?dbhtml filename="rsyslog.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Rsyslog-&rsyslog-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-rsyslog">
|
---|
| 14 | <primary sortas="a-rsyslog">rsyslog</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The rsyslog package contains programs for logging system messages,
|
---|
| 21 | such as those given by the kernel when unusual things happen.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="installation">
|
---|
[13e20ae] | 26 | <title>Installation of Rsyslog</title>
|
---|
[37de9d1] | 27 |
|
---|
| 28 | <para os="a">Prepare Rsyslog for compilation:</para>
|
---|
| 29 |
|
---|
[46d9161] | 30 | <screen os="b"><userinput>./configure --prefix=/usr</userinput></screen>
|
---|
[37de9d1] | 31 |
|
---|
| 32 | <para os="c">Compile the package:</para>
|
---|
| 33 |
|
---|
[8260ff5d] | 34 | <screen os="d"><userinput>make</userinput></screen>
|
---|
[37de9d1] | 35 |
|
---|
[686839b] | 36 | <para os="e">To test the results, issue:</para>
|
---|
| 37 |
|
---|
| 38 | <screen os="e2"><userinput remap="test">make check</userinput></screen>
|
---|
[37de9d1] | 39 |
|
---|
| 40 | <para os="f">Install the package:</para>
|
---|
| 41 |
|
---|
| 42 | <screen os="g"><userinput>make install</userinput></screen>
|
---|
| 43 |
|
---|
[3a14187] | 44 | <para os="h">Create a directory for expansion snippets:</para>
|
---|
| 45 |
|
---|
| 46 | <screen os="i"><userinput>install -dv /etc/rsyslog.d</userinput></screen>
|
---|
| 47 |
|
---|
[37de9d1] | 48 | </sect2>
|
---|
| 49 |
|
---|
| 50 | <sect2 id="conf-rsyslog" role="configuration">
|
---|
| 51 | <title>Configuring rsyslog</title>
|
---|
| 52 |
|
---|
| 53 | <indexterm zone="conf-rsyslog">
|
---|
| 54 | <primary sortas="a-rsyslog">rsyslog</primary>
|
---|
| 55 | <secondary>configuring</secondary></indexterm>
|
---|
| 56 |
|
---|
| 57 | <indexterm zone="conf-rsyslog">
|
---|
| 58 | <primary sortas="e-/etc/rsyslog.conf">/etc/rsyslog.conf</primary>
|
---|
| 59 | </indexterm>
|
---|
| 60 |
|
---|
| 61 | <para>Create a new <filename>/etc/rsyslog.conf</filename> file by running
|
---|
| 62 | the following:</para>
|
---|
| 63 |
|
---|
| 64 | <screen><userinput>cat > /etc/rsyslog.conf << "EOF"
|
---|
| 65 | <literal># Begin /etc/rsyslog.conf
|
---|
| 66 |
|
---|
| 67 | # CLFS configuration of rsyslog. For more info use man rsyslog.conf
|
---|
| 68 |
|
---|
| 69 | #######################################################################
|
---|
| 70 | # Rsyslog Modules
|
---|
| 71 |
|
---|
| 72 | # Support for Local System Logging
|
---|
| 73 | $ModLoad imuxsock.so
|
---|
| 74 |
|
---|
| 75 | # Support for Kernel Logging
|
---|
| 76 | $ModLoad imklog.so
|
---|
| 77 |
|
---|
| 78 | #######################################################################
|
---|
| 79 | # Global Options
|
---|
| 80 |
|
---|
| 81 | # Use traditional timestamp format.
|
---|
| 82 | $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
---|
| 83 |
|
---|
| 84 | # Set the default permissions for all log files.
|
---|
| 85 | $FileOwner root
|
---|
| 86 | $FileGroup root
|
---|
| 87 | $FileCreateMode 0640
|
---|
| 88 | $DirCreateMode 0755
|
---|
| 89 |
|
---|
[b25f67d] | 90 | # Provides UDP reception
|
---|
| 91 | $ModLoad imudp
|
---|
| 92 | $UDPServerRun 514
|
---|
| 93 |
|
---|
[85956ca] | 94 | # Disable Repeating of Entries
|
---|
[b25f67d] | 95 | $RepeatedMsgReduction on
|
---|
| 96 |
|
---|
[3a14187] | 97 | #######################################################################
|
---|
| 98 | # Include Rsyslog Config Snippets
|
---|
| 99 |
|
---|
| 100 | $IncludeConfig /etc/rsyslog.d/*.conf
|
---|
| 101 |
|
---|
[37de9d1] | 102 | #######################################################################
|
---|
| 103 | # Standard Log Files
|
---|
| 104 |
|
---|
| 105 | auth,authpriv.* /var/log/auth.log
|
---|
| 106 | *.*;auth,authpriv.none -/var/log/syslog
|
---|
| 107 | daemon.* -/var/log/daemon.log
|
---|
| 108 | kern.* -/var/log/kern.log
|
---|
| 109 | lpr.* -/var/log/lpr.log
|
---|
| 110 | mail.* -/var/log/mail.log
|
---|
| 111 | user.* -/var/log/user.log
|
---|
| 112 |
|
---|
| 113 | # Catch All Logs
|
---|
| 114 | *.=debug;\
|
---|
| 115 | auth,authpriv.none;\
|
---|
| 116 | news.none;mail.none -/var/log/debug
|
---|
| 117 | *.=info;*.=notice;*.=warn;\
|
---|
| 118 | auth,authpriv.none;\
|
---|
| 119 | cron,daemon.none;\
|
---|
| 120 | mail,news.none -/var/log/messages
|
---|
| 121 |
|
---|
[85956ca] | 122 | # Emergencies are shown to everyone
|
---|
[37de9d1] | 123 | *.emerg *
|
---|
| 124 |
|
---|
| 125 | # End /etc/rsyslog.conf</literal>
|
---|
| 126 | EOF</userinput></screen>
|
---|
| 127 |
|
---|
| 128 | </sect2>
|
---|
| 129 |
|
---|
| 130 | <sect2 id="contents-rsyslog" role="content">
|
---|
| 131 | <title>Contents of rsyslog</title>
|
---|
| 132 |
|
---|
| 133 | <segmentedlist>
|
---|
| 134 | <segtitle>Installed programs</segtitle>
|
---|
[61ad0b7f] | 135 | <segtitle>Installed directory</segtitle>
|
---|
[37de9d1] | 136 |
|
---|
| 137 | <seglistitem>
|
---|
| 138 | <seg>rsyslogd</seg>
|
---|
[61ad0b7f] | 139 | <seg>/usr/lib/rsyslog</seg>
|
---|
[37de9d1] | 140 | </seglistitem>
|
---|
| 141 | </segmentedlist>
|
---|
| 142 |
|
---|
| 143 | <variablelist>
|
---|
| 144 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 145 | <?dbfo list-presentation="list"?>
|
---|
| 146 | <?dbhtml list-presentation="table"?>
|
---|
| 147 |
|
---|
| 148 | <varlistentry id="rsyslogd">
|
---|
| 149 | <term><command>rsyslogd</command></term>
|
---|
| 150 | <listitem>
|
---|
| 151 | <para>Logs the messages that system programs offer for logging.
|
---|
| 152 | Every logged message contains at least a date stamp and a hostname,
|
---|
| 153 | and normally the program's name too, but that depends on how
|
---|
| 154 | trusting the logging daemon is told to be.</para>
|
---|
| 155 | <indexterm zone="ch-system-rsyslog rsyslogd">
|
---|
[665937ac] | 156 | <primary sortas="b-rsyslogd">rsyslogd</primary>
|
---|
[37de9d1] | 157 | </indexterm>
|
---|
| 158 | </listitem>
|
---|
| 159 | </varlistentry>
|
---|
| 160 |
|
---|
| 161 | </variablelist>
|
---|
| 162 |
|
---|
| 163 | </sect2>
|
---|
| 164 |
|
---|
| 165 | </sect1>
|
---|