1 |
keytoaster 11/12/24 19:58:07 |
2 |
|
3 |
Added: logcheck.xml |
4 |
Log: |
5 |
Initial translation, by Christian Gebler, thanks! English revision 1.2. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 xml/htdocs/doc/de/logcheck.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/de/logcheck.xml?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/de/logcheck.xml?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: logcheck.xml |
14 |
=================================================================== |
15 |
<?xml version='1.0' encoding='UTF-8'?> |
16 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
17 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/de/logcheck.xml,v 1.1 2011/12/24 19:58:07 keytoaster Exp $ --> |
18 |
|
19 |
<guide lang="de"> |
20 |
<title>Logcheck Leitfaden</title> |
21 |
|
22 |
<author title="Autor"> |
23 |
<mail link="phajdan.jr"/> |
24 |
</author> |
25 |
<author title="Bearbeiter"> |
26 |
<mail link="nightmorph"/> |
27 |
</author> |
28 |
<author title="Übersetzer"> |
29 |
<mail link="geblerc@×××××.com">Christian Gebler</mail> |
30 |
</author> |
31 |
|
32 |
<abstract> |
33 |
Diese Anleitung zeigt Ihnen, wie man Logdateien mit logcheck analysiert. |
34 |
</abstract> |
35 |
|
36 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
37 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
38 |
<license/> |
39 |
|
40 |
<version>2</version> |
41 |
<date>2010-10-12</date> |
42 |
|
43 |
<chapter> |
44 |
<title>Erste Schritte mit logcheck</title> |
45 |
<section> |
46 |
<title>Hintergrund</title> |
47 |
<body> |
48 |
|
49 |
<p> |
50 |
<c>logcheck</c> ist eine aktualisierte Version von <c>logsentry</c> (aus dem |
51 |
<c>sentrytools</c> Paket), und wird benutzt, um System-Logdateien zu |
52 |
analysieren. Zusätzlich beinhaltet <c>logcheck</c> eine Datenbank, die mit |
53 |
häufigen und nicht sehr interessanten Log-Nachrichten befüllt ist, um unwichtige |
54 |
Meldungen zu filtern. Generell stuft das Programm alle Meldungen als wichtig |
55 |
ein, mit Ausnahme deren, die expliziet als unwichtig markiert werden. |
56 |
<c>logcheck</c> benachrichtigt Sie regelmäßig per Email über wichtige Meldungen. |
57 |
</p> |
58 |
|
59 |
</body> |
60 |
</section> |
61 |
<section> |
62 |
<title>logcheck installieren</title> |
63 |
<body> |
64 |
|
65 |
<impo> |
66 |
Es wird dringend empfohlen, logsentry zu entfernen, falls Sie es auf Ihrem |
67 |
System installiert haben. Zusätzlich sollten Sie /etc/logcheck entfernen, um |
68 |
Probleme mit Benutzerrechten und Datei-Kollisionen zu vermeiden. |
69 |
</impo> |
70 |
|
71 |
<pre caption="logsentry entfernen"> |
72 |
<comment>(Deinstalliert das logsentry Paket)</comment> |
73 |
# <i>emerge -C logsentry</i> |
74 |
<comment>(entfernt liegengebliebene Dateien)</comment> |
75 |
# <i>rm -rf /etc/logcheck</i> |
76 |
</pre> |
77 |
|
78 |
<p> |
79 |
Nun können Sie mit der Installation von logcheck fortfahren. |
80 |
</p> |
81 |
|
82 |
<pre caption="logcheck installieren"> |
83 |
# <i>emerge -av app-admin/logcheck</i> |
84 |
</pre> |
85 |
|
86 |
</body> |
87 |
</section> |
88 |
<section> |
89 |
<title>Basis-Konfiguration</title> |
90 |
<body> |
91 |
|
92 |
<p> |
93 |
<c>logcheck</c> erstellt einen eigenen Benutzer "logcheck", um nicht als root |
94 |
ausgeführt werden zu müssen. Es verhindert sogar die Ausführung als root. Damit |
95 |
es die Logdateien analysieren kann, müssen die Dateien von logcheck lesbar |
96 |
sein. Hier ist ein Beispiel für den <c>syslog-ng</c>: |
97 |
</p> |
98 |
|
99 |
<pre caption="/etc/syslog-ng/syslog-ng.conf Auszug"> |
100 |
options { |
101 |
owner(root); |
102 |
|
103 |
<comment>(Macht die Logdateien für die Gruppe logcheck lesbar)</comment> |
104 |
group(logcheck); |
105 |
perm(0640); |
106 |
}; |
107 |
</pre> |
108 |
|
109 |
<p> |
110 |
Laden Sie die Konfiguration neu und stellen Sie sicher, dass die Änderungen |
111 |
ordnungsgemäß funktionieren. |
112 |
</p> |
113 |
|
114 |
<pre caption="syslog-ng Konfiguration neu laden"> |
115 |
# <i>/etc/init.d/syslog-ng reload</i> |
116 |
<comment> |
117 |
(Stellen Sie sicher, dass /var/log/messages die richtigen Rechte besitzt) |
118 |
</comment> |
119 |
# <i>ls -l /var/log/messages</i> |
120 |
-rw-r----- 1 root logcheck 1694438 Feb 12 12:18 /var/log/messages |
121 |
</pre> |
122 |
|
123 |
<p> |
124 |
Sie sollten nun ein paar grundlegende <c>logcheck</c> Einstellungen in |
125 |
<path>/etc/logcheck/logcheck.conf</path> vornehmen. |
126 |
</p> |
127 |
|
128 |
<pre caption="Basiseinstellungen /etc/logcheck/logcheck.conf"> |
129 |
# Controls the level of filtering: |
130 |
# Can be Set to "workstation", "server" or "paranoid" for different |
131 |
# levels of filtering. Defaults to server if not set. |
132 |
<comment>(Die Einstufung "workstation" beinhaltet "server" und "server" |
133 |
beinhaltet die Stufe "paranoid". Die Stufe "paranoid" filtert beinahe |
134 |
keine Meldungen)</comment> |
135 |
REPORTLEVEL="server" |
136 |
|
137 |
# Controls the address mail goes to: |
138 |
# *NOTE* the script does not set a default value for this variable! |
139 |
# Should be set to an offsite "emailaddress@×××××××××××.tld" |
140 |
<comment>(Stellen Sie sicher, dsas Sie die logcheck E-Mails empfangen können. |
141 |
Ein Test wird dringend empfohlen.)</comment> |
142 |
SENDMAILTO="root" |
143 |
|
144 |
# Controls if syslog-summary is run over each section. |
145 |
# Alternatively, set to "1" to enable extra summary. |
146 |
# HINT: syslog-summary needs to be installed. |
147 |
<comment>(Wenn Sie viele gleiche Meldungen in den Logdateien stehen haben, |
148 |
können Sie app-admin/syslog-summary installieren und die folgende Option |
149 |
aktivieren.)</comment> |
150 |
SYSLOGSUMMARY=0 |
151 |
</pre> |
152 |
|
153 |
<p>Außerdem müssen Sie <c>logcheck</c> mitteilen, welche Logdateien analysiert |
154 |
werden sollen (<path>/etc/logcheck/logcheck.logfiles</path>). |
155 |
</p> |
156 |
|
157 |
<pre caption="Basiseinstellungen /etc/logcheck/logcheck.logfiles"> |
158 |
<comment>(Das ist ein syslog-ng Beispiel)</comment> |
159 |
/var/log/messages |
160 |
</pre> |
161 |
|
162 |
<p> |
163 |
Abschließend aktivieren Sie den logcheck Cronjob. |
164 |
</p> |
165 |
|
166 |
<pre caption="logcheck Cron Job aktivieren"> |
167 |
<comment>(Editieren Sie die Cronjob-Datei und folgen Sie den dort stehenden |
168 |
Anweisungen)</comment> |
169 |
# <i>nano -w /etc/cron.hourly/logcheck.cron</i> |
170 |
</pre> |
171 |
|
172 |
<note> |
173 |
Für mehr Informationen zu Cron lesen Sie den <uri link="/doc/de/cron-guide.xml"> |
174 |
Cron-Leitfaden</uri>. |
175 |
</note> |
176 |
|
177 |
<p> |
178 |
Herzlichen Glückwunsch! Sie bekommen nun regelmäßig wichtige Log-Meldungen per |
179 |
E-Mail. Ein Beispiel der Nachricht sieht wie folgt aus: |
180 |
</p> |
181 |
|
182 |
<pre caption="Beispiel logcheck-Meldung"> |
183 |
System Events |
184 |
=-=-=-=-=-=-= |
185 |
Feb 10 17:13:53 localhost kernel: [30233.238342] conftest[25838]: segfault at 40 ip 40061403 sp bfc443c4 error 4 |
186 |
in libc-2.10.1.so[4003e000+142000] |
187 |
Feb 11 12:31:21 localhost postfix/pickup[18704]: fatal: could not find any active network interfaces |
188 |
Feb 11 12:31:22 localhost postfix/master[3776]: warning: process //usr/lib/postfix/pickup pid 18704 exit status 1 |
189 |
Feb 11 12:31:22 localhost postfix/master[3776]: warning: //usr/lib/postfix/pickup: bad command startup -- throttling |
190 |
</pre> |
191 |
|
192 |
</body> |
193 |
</section> |
194 |
</chapter> |
195 |
|
196 |
<chapter> |
197 |
<title>Problemlösungen</title> |
198 |
<section> |
199 |
<title>Generelle Tipps</title> |
200 |
<body> |
201 |
|
202 |
<p> |
203 |
Sie können die logcheck-Option <c>-d</c> benutzen, um genauere Meldungen zur |
204 |
Fehlersuche zu erhalten. Ein Beispiel: |
205 |
</p> |
206 |
|
207 |
<pre caption="Ausführliche logcheck-Meldungen zur Fehlersuche"> |
208 |
# <i>su -s /bin/bash -c '/usr/sbin/logcheck -d' logcheck</i> |
209 |
D: [1281318818] Turning debug mode on |
210 |
D: [1281318818] Sourcing - /etc/logcheck/logcheck.conf |
211 |
D: [1281318818] Finished getopts c:dhH:l:L:m:opr:RsS:tTuvw |
212 |
D: [1281318818] Trying to get lockfile: /var/lock/logcheck/logcheck.lock |
213 |
D: [1281318818] Running lockfile-touch /var/lock/logcheck/logcheck.lock |
214 |
D: [1281318818] cleanrules: /etc/logcheck/cracking.d/kernel |
215 |
... |
216 |
D: [1281318818] cleanrules: /etc/logcheck/violations.d/su |
217 |
D: [1281318818] cleanrules: /etc/logcheck/violations.d/sudo |
218 |
... |
219 |
D: [1281318825] logoutput called with file: /var/log/messages |
220 |
D: [1281318825] Running /usr/sbin/logtail2 on /var/log/messages |
221 |
D: [1281318825] Sorting logs |
222 |
D: [1281318825] Setting the Intro |
223 |
D: [1281318825] Checking for security alerts |
224 |
D: [1281318825] greplogoutput: kernel |
225 |
... |
226 |
D: [1281318825] greplogoutput: returning 1 |
227 |
D: [1281318825] Checking for security events |
228 |
... |
229 |
D: [1281318825] greplogoutput: su |
230 |
D: [1281318825] greplogoutput: Entries in checked |
231 |
D: [1281318825] cleanchecked - file: /tmp/logcheck.uIFLqU/violations-ignore/logcheck-su |
232 |
D: [1281318825] report: cat'ing - Security Events for su |
233 |
... |
234 |
D: [1281318835] report: cat'ing - System Events |
235 |
D: [1281318835] Setting the footer text |
236 |
D: [1281318835] Sending report: 'localhost 2010-08-09 03:53 Security Events' to root |
237 |
D: [1281318835] cleanup: Killing lockfile-touch - 17979 |
238 |
D: [1281318835] cleanup: Removing lockfile: /var/lock/logcheck/logcheck.lock |
239 |
D: [1281318835] cleanup: Removing - /tmp/logcheck.uIFLqU |
240 |
</pre> |
241 |
|
242 |
</body> |
243 |
</section> |
244 |
</chapter> |
245 |
</guide> |