Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | added link to git repo | ahriman | 2018-12-19 | 1 | -1/+1 |
| | |||||
* | misc typos, changed page titles | ahriman | 2018-12-19 | 1 | -1/+1 |
| | |||||
* | changed contact email | ahriman | 2018-12-17 | 1 | -1/+1 |
| | |||||
* | updated info w/r/t mailing list | ahriman | 2018-12-15 | 1 | -1/+1 |
| | |||||
* | fixed nav links for stats page | ahriman | 2018-12-10 | 1 | <!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset='utf-8'>
<title>1. Logwatch</title>
</head>
<body>
<h1>1. Logwatch</h1>
<p>Get <a href="https://crux.nu/portdb/index.php?a=getup&q=deepthought">deepthought.httpup</a>
and move it to /etc/ports. Activate collection in /etc/prt-get.conf and run;</p>
<pre>
$ ports -u
$ prt-get depinst logwatch
</pre>
<h2 id="conf">1.1. Configure</h2>
<pre>
$ sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
</pre>
<p>Example configuration;</p>
<pre>
MailTo = admin@box
MailFrom = logwatch
Range = Today
Detail = Med
</pre>
<p>Activate all or per service;</p>
<pre>
#Service = All
Service = http
Service = exim
Service = dhcpd
</pre>
<pre>
$ sudo /usr/share/logwatch/scripts/logwatch.pl
</pre>
<h2 id="cron">1.2. Set cron task</h2>
<p>First make sure that email gets deliver;</p>
<pre>
$ sudo /usr/share/logwatch/scripts/logwatch.pl --output mail
</pre>
<p>Create file /etc/cron/daily/logwatch;</p>
<pre>
#!/bin/sh
#
# /etc/cron/daily/logwatch: run logwatch and mail output
#
/usr/share/logwatch/scripts/logwatch.pl --output mail
# End of file
</pre>
<pre>
$ sudo chmod +x /etc/cron/daily/logwatch
</pre>
</body>
</html>
|