[d1a66a0] | 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">
|
---|
[f23c8b9] | 7 | <title>Syslog-ng-&syslog-ng-version;</title>
|
---|
[d1a66a0] | 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 |
|
---|
| 14 | <segmentedlist>
|
---|
| 15 | <segtitle>&buildtime;</segtitle>
|
---|
| 16 | <segtitle>&diskspace;</segtitle>
|
---|
| 17 | <seglistitem><seg>Unchecked</seg><seg>Unchecked</seg></seglistitem>
|
---|
| 18 | </segmentedlist>
|
---|
| 19 |
|
---|
| 20 | </sect2>
|
---|
| 21 |
|
---|
| 22 | <sect2 role="installation">
|
---|
| 23 | <title>Installation of Syslog-ng</title>
|
---|
| 24 |
|
---|
| 25 | <para>Prepare Syslog-ng for compilation:</para>
|
---|
| 26 |
|
---|
| 27 | <screen><userinput>./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
|
---|
| 28 |
|
---|
| 29 | <para>Compile Syslog-ng:</para>
|
---|
| 30 |
|
---|
| 31 | <screen><userinput>make</userinput></screen>
|
---|
| 32 |
|
---|
| 33 | <para>Now install it:</para>
|
---|
| 34 |
|
---|
| 35 | <screen><userinput>make install</userinput></screen>
|
---|
| 36 |
|
---|
| 37 | </sect2>
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 | <sect2 id="conf-syslogng" role="configuration"><title>Configuring Syslog-ng</title>
|
---|
| 41 |
|
---|
[3f0c882] | 42 | <para>Create a <filename>/etc/syslog-ng/syslog-ng.conf</filename> file:</para>
|
---|
[d1a66a0] | 43 |
|
---|
| 44 | <screen><userinput>mkdir -p /etc/syslog-ng
|
---|
| 45 | cat > /etc/syslog-ng/syslog-ng.conf << "EOF"
|
---|
| 46 | # Begin /etc/syslog-ng/syslog-ng.conf
|
---|
| 47 |
|
---|
| 48 | options { sync (0);
|
---|
| 49 | time_reopen (10);
|
---|
| 50 | log_fifo_size (1000);
|
---|
| 51 | long_hostnames(off);
|
---|
| 52 | use_dns (no);
|
---|
| 53 | use_fqdn (no);
|
---|
| 54 | create_dirs (no);
|
---|
| 55 | keep_hostname (yes);
|
---|
| 56 | };
|
---|
| 57 |
|
---|
| 58 | source src { unix-stream("/dev/log");
|
---|
| 59 | internal();
|
---|
| 60 | pipe("/proc/kmsg");
|
---|
| 61 | };
|
---|
| 62 |
|
---|
| 63 | destination authlog { file("/var/log/authorize.log"); };
|
---|
| 64 | destination syslog { file("/var/log/syslog.log"); };
|
---|
| 65 | destination cron { file("/var/log/cron.log"); };
|
---|
| 66 | destination daemon { file("/var/log/daemon.log"); };
|
---|
| 67 | destination kernel { file("/var/log/kernel.log"); };
|
---|
| 68 | destination lpr { file("/var/log/lpr.log"); };
|
---|
| 69 | destination user { file("/var/log/user.log"); };
|
---|
| 70 | destination uucp { file("/var/log/uucp.log"); };
|
---|
| 71 | destination mail { file("/var/log/mail.log"); };
|
---|
| 72 | destination news { file("/var/log/news.log"); };
|
---|
| 73 | destination debug { file("/var/log/debug.log"); };
|
---|
| 74 | destination messages { file("/var/log/messages.log"); };
|
---|
| 75 | destination everything { file("/var/log/everything.log"); };
|
---|
| 76 | destination console { usertty("root"); };
|
---|
| 77 | destination console_all { file("/dev/tty12"); };
|
---|
| 78 |
|
---|
| 79 | filter f_auth { facility(auth); };
|
---|
| 80 | filter f_authpriv { facility(auth, authpriv); };
|
---|
| 81 | filter f_syslog { not facility(authpriv, mail); };
|
---|
| 82 | filter f_cron { facility(cron); };
|
---|
| 83 | filter f_daemon { facility(daemon); };
|
---|
| 84 | filter f_kernel { facility(kern); };
|
---|
| 85 | filter f_lpr { facility(lpr); };
|
---|
| 86 | filter f_mail { facility(mail); };
|
---|
| 87 | filter f_news { facility(news); };
|
---|
| 88 | filter f_user { facility(user); };
|
---|
[7d8fb5f] | 89 | filter f_uucp { facility(uucp); };
|
---|
[d1a66a0] | 90 | filter f_debug { not facility(auth, authpriv, news, mail); };
|
---|
| 91 | filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news); };
|
---|
| 92 | filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };
|
---|
| 93 |
|
---|
| 94 | filter f_emergency { level(emerg); };
|
---|
| 95 | filter f_info { level(info); };
|
---|
| 96 | filter f_notice { level(notice); };
|
---|
| 97 | filter f_warn { level(warn); };
|
---|
| 98 | filter f_crit { level(crit); };
|
---|
| 99 | filter f_err { level(err); };
|
---|
| 100 |
|
---|
| 101 | log { source(src); filter(f_authpriv); destination(authlog); };
|
---|
| 102 | log { source(src); filter(f_syslog); destination(syslog); };
|
---|
| 103 | log { source(src); filter(f_cron); destination(cron); };
|
---|
| 104 | log { source(src); filter(f_daemon); destination(daemon); };
|
---|
| 105 | log { source(src); filter(f_kernel); destination(kernel); };
|
---|
| 106 | log { source(src); filter(f_lpr); destination(lpr); };
|
---|
| 107 | log { source(src); filter(f_mail); destination(mail); };
|
---|
| 108 | log { source(src); filter(f_news); destination(news); };
|
---|
| 109 | log { source(src); filter(f_user); destination(user); };
|
---|
| 110 | log { source(src); filter(f_uucp); destination(uucp); };
|
---|
| 111 | log { source(src); filter(f_debug); destination(debug); };
|
---|
| 112 | log { source(src); filter(f_messages); destination(messages); };
|
---|
| 113 | log { source(src); filter(f_emergency); destination(console); };
|
---|
| 114 | log { source(src); filter(f_everything); destination(everything); };
|
---|
| 115 | log { source(src); destination(console_all); };
|
---|
| 116 |
|
---|
| 117 | # END /etc/syslog-ng/syslog-ng.conf
|
---|
| 118 | EOF</userinput></screen>
|
---|
| 119 |
|
---|
| 120 | </sect2>
|
---|
| 121 |
|
---|
| 122 | <sect2 id="contents-syslogng" role="content"><title>Contents of Syslog-ng</title>
|
---|
| 123 |
|
---|
[3f0c882] | 124 | <para>See testing</para>
|
---|
[d1a66a0] | 125 |
|
---|
| 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | </sect1>
|
---|