1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
4 | %general-entities;
|
---|
5 | ]>
|
---|
6 | <sect1 id="ch-system-syslogng" xreflabel="Syslog-ng" role="wrap">
|
---|
7 | <title>Syslog-ng-&syslog-ng-version;</title>
|
---|
8 | <?dbhtml filename="syslogng.html"?>
|
---|
9 |
|
---|
10 | <indexterm zone="ch-system-syslogng"><primary sortas="a-Syslogng">Syslog-ng</primary></indexterm>
|
---|
11 |
|
---|
12 | <sect2 role="package"><title/>
|
---|
13 | <para>The Syslog-ng package contains programs for logging system messages, such
|
---|
14 | as those given by the kernel when unusual things happen.</para>
|
---|
15 |
|
---|
16 | <segmentedlist>
|
---|
17 | <segtitle>&buildtime;</segtitle>
|
---|
18 | <segtitle>&diskspace;</segtitle>
|
---|
19 | <seglistitem><seg>Unchecked</seg><seg>Unchecked</seg></seglistitem>
|
---|
20 | </segmentedlist>
|
---|
21 |
|
---|
22 | <segmentedlist>
|
---|
23 | <segtitle>Syslog-ng installation depends on</segtitle>
|
---|
24 | <seglistitem><seg>Unchecked</seg></seglistitem>
|
---|
25 | </segmentedlist>
|
---|
26 | </sect2>
|
---|
27 |
|
---|
28 | <sect2 role="installation">
|
---|
29 | <title>Installation of Syslog-ng</title>
|
---|
30 |
|
---|
31 | <para>Prepare Syslog-ng for compilation:</para>
|
---|
32 |
|
---|
33 | <screen><userinput>./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
|
---|
34 |
|
---|
35 | <para>Compile Syslog-ng:</para>
|
---|
36 |
|
---|
37 | <screen><userinput>make</userinput></screen>
|
---|
38 |
|
---|
39 | <para>Now install it:</para>
|
---|
40 |
|
---|
41 | <screen><userinput>make install</userinput></screen>
|
---|
42 |
|
---|
43 | </sect2>
|
---|
44 |
|
---|
45 |
|
---|
46 | <sect2 id="conf-syslogng" role="configuration"><title>Configuring Syslog-ng</title>
|
---|
47 | <indexterm zone="conf-syslogng">
|
---|
48 | <primary sortas="a-Syslogng">Syslog-ng</primary>
|
---|
49 | <secondary>configuring</secondary></indexterm>
|
---|
50 |
|
---|
51 | <indexterm zone="conf-syslogng"><primary sortas="e-/etc/syslog-ng/syslog-ng.conf">/etc/syslog-ng/syslog-ng.conf</primary></indexterm>
|
---|
52 |
|
---|
53 | <para>Create a new <filename>/etc/syslog-ng/syslog-ng.conf</filename> file by
|
---|
54 | running the following:</para>
|
---|
55 |
|
---|
56 | <screen><userinput>mkdir -p /etc/syslog-ng
|
---|
57 | cat > /etc/syslog-ng/syslog-ng.conf << "EOF"
|
---|
58 | # Begin /etc/syslog-ng/syslog-ng.conf
|
---|
59 |
|
---|
60 | options { sync (0);
|
---|
61 | time_reopen (10);
|
---|
62 | log_fifo_size (1000);
|
---|
63 | long_hostnames(off);
|
---|
64 | use_dns (no);
|
---|
65 | use_fqdn (no);
|
---|
66 | create_dirs (no);
|
---|
67 | keep_hostname (yes);
|
---|
68 | };
|
---|
69 |
|
---|
70 | source src { unix-stream("/dev/log");
|
---|
71 | internal();
|
---|
72 | pipe("/proc/kmsg");
|
---|
73 | };
|
---|
74 |
|
---|
75 | destination authlog { file("/var/log/authorize.log"); };
|
---|
76 | destination syslog { file("/var/log/syslog.log"); };
|
---|
77 | destination cron { file("/var/log/cron.log"); };
|
---|
78 | destination daemon { file("/var/log/daemon.log"); };
|
---|
79 | destination kernel { file("/var/log/kernel.log"); };
|
---|
80 | destination lpr { file("/var/log/lpr.log"); };
|
---|
81 | destination user { file("/var/log/user.log"); };
|
---|
82 | destination uucp { file("/var/log/uucp.log"); };
|
---|
83 | destination mail { file("/var/log/mail.log"); };
|
---|
84 | destination news { file("/var/log/news.log"); };
|
---|
85 | destination debug { file("/var/log/debug.log"); };
|
---|
86 | destination messages { file("/var/log/messages.log"); };
|
---|
87 | destination everything { file("/var/log/everything.log"); };
|
---|
88 | destination console { usertty("root"); };
|
---|
89 | destination console_all { file("/dev/tty12"); };
|
---|
90 |
|
---|
91 | filter f_auth { facility(auth); };
|
---|
92 | filter f_authpriv { facility(auth, authpriv); };
|
---|
93 | filter f_syslog { not facility(authpriv, mail); };
|
---|
94 | filter f_cron { facility(cron); };
|
---|
95 | filter f_daemon { facility(daemon); };
|
---|
96 | filter f_kernel { facility(kern); };
|
---|
97 | filter f_lpr { facility(lpr); };
|
---|
98 | filter f_mail { facility(mail); };
|
---|
99 | filter f_news { facility(news); };
|
---|
100 | filter f_user { facility(user); };
|
---|
101 | filter f_uucp { facility(uucp); };
|
---|
102 | filter f_debug { not facility(auth, authpriv, news, mail); };
|
---|
103 | filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news); };
|
---|
104 | filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };
|
---|
105 |
|
---|
106 | filter f_emergency { level(emerg); };
|
---|
107 | filter f_info { level(info); };
|
---|
108 | filter f_notice { level(notice); };
|
---|
109 | filter f_warn { level(warn); };
|
---|
110 | filter f_crit { level(crit); };
|
---|
111 | filter f_err { level(err); };
|
---|
112 |
|
---|
113 | log { source(src); filter(f_authpriv); destination(authlog); };
|
---|
114 | log { source(src); filter(f_syslog); destination(syslog); };
|
---|
115 | log { source(src); filter(f_cron); destination(cron); };
|
---|
116 | log { source(src); filter(f_daemon); destination(daemon); };
|
---|
117 | log { source(src); filter(f_kernel); destination(kernel); };
|
---|
118 | log { source(src); filter(f_lpr); destination(lpr); };
|
---|
119 | log { source(src); filter(f_mail); destination(mail); };
|
---|
120 | log { source(src); filter(f_news); destination(news); };
|
---|
121 | log { source(src); filter(f_user); destination(user); };
|
---|
122 | log { source(src); filter(f_uucp); destination(uucp); };
|
---|
123 | log { source(src); filter(f_debug); destination(debug); };
|
---|
124 | log { source(src); filter(f_messages); destination(messages); };
|
---|
125 | log { source(src); filter(f_emergency); destination(console); };
|
---|
126 | log { source(src); filter(f_everything); destination(everything); };
|
---|
127 | log { source(src); destination(console_all); };
|
---|
128 |
|
---|
129 | # END /etc/syslog-ng/syslog-ng.conf
|
---|
130 | EOF</userinput></screen>
|
---|
131 |
|
---|
132 | </sect2>
|
---|
133 |
|
---|
134 | <sect2 id="contents-syslogng" role="content"><title>Contents of Syslog-ng</title>
|
---|
135 |
|
---|
136 | <segmentedlist>
|
---|
137 | <segtitle>Installed programs</segtitle>
|
---|
138 | <seglistitem><seg>Unchecked</seg></seglistitem>
|
---|
139 | </segmentedlist>
|
---|
140 |
|
---|
141 | <variablelist><title>Short descriptions</title>
|
---|
142 |
|
---|
143 | <varlistentry id="syslog-ng">
|
---|
144 | <term><command>syslog-ng</command></term>
|
---|
145 | <listitem>
|
---|
146 | <indexterm zone="ch-system-syslogng"><primary sortas="b-syslog-ng">syslog-ng</primary></indexterm>
|
---|
147 | <para>logs the messages that system programs
|
---|
148 | offer for logging. Every logged message contains at least a date stamp and a
|
---|
149 | hostname, and normally the program's name too, but that depends on how
|
---|
150 | trusting the logging daemon is told to be.</para>
|
---|
151 | </listitem>
|
---|
152 |
|
---|
153 | </varlistentry>
|
---|
154 | </variablelist>
|
---|
155 |
|
---|
156 | </sect2>
|
---|
157 |
|
---|
158 | </sect1>
|
---|