aboutsummaryrefslogtreecommitdiffstats
path: root/tools/logwatch.html
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-09-15 00:47:34 +0100
committerSilvino Silva <silvino@bk.ru>2016-09-15 00:47:34 +0100
commit07bedee34d9ded6f86904c7e4b4e02464ff8cb14 (patch)
tree242dcbfdcd97667017bdfcaaa535919b01168fe1 /tools/logwatch.html
parentb9762bb44befe4a852688eb19cce1aec3462f2ca (diff)
downloaddoc-07bedee34d9ded6f86904c7e4b4e02464ff8cb14.tar.gz
added tools
Diffstat (limited to 'tools/logwatch.html')
-rw-r--r--tools/logwatch.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/tools/logwatch.html b/tools/logwatch.html
new file mode 100644
index 0000000..4f35571
--- /dev/null
+++ b/tools/logwatch.html
@@ -0,0 +1,72 @@
+<!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>