Projekt

Allgemein

Profil

Setup logwatch » Historie » Version 3

Jeremias Keihsler, 22.11.2022 10:57

1 1 Jeremias Keihsler
h1. Setup logwatch
2
3
taken from https://ubuntu.com/server/docs/logwatch
4
5
<pre><code class="shell">
6
sudo apt install logwatch
7
</code></pre>
8
9
You will also need to manually create its temporary directory in order for it to work:
10
11
<pre><code class="shell">
12
sudo mkdir /var/cache/logwatch
13
</code></pre>
14
15
Logwatch’s stock configuration is kept in /usr/share/logwatch/default.conf/logwatch.conf, however rather than edit our configuration changes directly to that file, the convention is to copy it into /etc for modification:
16
17
<pre><code class="shell">
18
sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
19
</code></pre>
20
21
With your favorite editor, open /etc/logwatch/conf/logwatch.conf. The uncommented lines indicate the default configuration values. First, lets customize some of the basics:
22
23
<pre>
24
Output = mail
25 2 Jeremias Keihsler
#  MailTo = me@mydomain.org
26
#  MailFrom = logwatch@host1.mydomain.org
27
#  Detail = Low
28
#  Service = All
29 1 Jeremias Keihsler
</pre>
30 3 Jeremias Keihsler
31
h2. troubleshoot
32
33
it was necessary to add a known addressee in @/etc/aliases@ who get's all root mails
34
<pre><code class="shell">
35
vim /etc/aliases
36
</code></pre>
37
38
<pre>
39
root:          me@example.com
40
</pre>