about summary refs log tree commit diff stats
path: root/tools/logwatch.html
blob: 9718763963a2507401a78aa47202804539e5c55a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
        <meta charset='utf-8'>
        <title>Logwatch</title>
    </head>
    <body>

        <a href="index.html">Tools Index</a>

        <h1>Logwatch</h1>

        <p>Install logwatch, ports collection contains <a href="https://crux.nu/portdb/index.php?a=getup&q=deepthought">deepthought.httpup</a> port;</p>

        <pre>
        $ prt-get depinst logwatch
        </pre>

        <h2 id="conf">1.1. Configure</h2>

        <p>Logwatch apply configuration state using layers of configuration files, last in the list is most important;</p>

        <ul>
            <li>/usr/share/logwatch/default.conf/*</li>
            <li>/etc/logwatch/conf/*</li>
            <li>command line arguments</li>
        </ul>

	<p>From logwatch documentation;</p>

	<pre>
	The contents of the three directories /usr/share/logwatch/default.conf,
	/usr/share/logwatch/dist.conf, and /etc/logwatch/conf, all have the
	same structure:

		services:	This subdirectory contains the configuration
				files specific to each service.  Logwatch
				determines which services are available by
				examining the contents of this directory.
				Each service configuration file is named by
				its service name with the ".conf" suffix.

		logfiles:	This subdirectory contains the logfile group
				configuration files.  Each logfile group
				configuration file contains information about
				one or more log files with the same format.
				Several services may use the same logfile
				group configuration file.  Each of these
				configuration files are named by the group
				name with the ".conf" suffix.  Many
				of the group names are taken from the name
				of a system log file (such as messages,
				maillog, secure, etc.), but not always.

		logwatch.conf:	This file contains the defaults for the
				overall execution of Logwatch, and affect all
				of its services.  Many of its parameters can
				be overridden by command-line switches when
				invoking the Logwatch executable, as described
				in the man page for Logwatch.

		ignore.conf:	This file specifies regular expressions that,
				when matched by the output of logwatch, will
				suppress the matching line, regardless of which
				service is being executed.

	The /etc/logwatch/conf directory may also contain the file 'override.conf',
	which is described in section 4, "Customizing the Configuration."
	</pre>

        <p>Copy default configuration to use as a template;</p>

        <pre>
        $ sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
        </pre>

        <p>Example configuration;</p>

        <pre>
        MailTo = admin@machine
        MailFrom = logwatch
        Range = Today
        Detail = Med
        </pre>

        <p>Default activate all services, to enable per service edit  /usr/share/logwatch/default.conf/logwatch.conf;</p>

        <pre>
        #Service = All
        </pre>

        <p>Then add the services to /etc/logwatch/conf/logwatch.conf;</p>

        <pre>
        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>

        <a href="index.html">Tools Index</a>

        <p>
        This is part of the LeetIO System Documentation.
        Copyright (C) 2021
        LeetIO Team.
        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p>
    </body>
</html>
pan>>. = - Show information about the file and link that you are currently viewing. \ - Toggles between viewing the HTML source of a document and the rendered version of the document. ! - Spawns your default operating system shell. ' - Toggles "historical" vs minimal or valid comment parsing. When historical, any close-angle-bracket will be treated as a comment terminator, emulating the parsing bug in old versions of Mosaic and Netscape, rather than validly requiring pairs of two successive dashes to delimit comments within the angle-brackets. _ - Clears all authorization info for the current session. Can be used when leaving one's terminal without ending the Lynx session, to guard against someone else retrieving protected documents with previously entered username/password info. Note that any protected documents that are still in cache can still be accessed. ` - Toggles minimal or valid comment parsing. When minimal, any two successive dashes followed by a close-angle-bracket will be treated as a comment terminator, emulating the parsing bug in Netscape v2.0. If historical comment parsing is set, that will override minimal or valid comment parsing. * - Toggles image_links mode on and off. When on, links will be created for all images, including inlines. @ - Toggles raw 8-bit translations or CJK mode on and off, only for documents which does not specify character set explicitly. Should be on when the document's charset matches the display character set, and otherwise off so that 8-bit characters will be translated by Lynx with respect to the Assumed document charset, using approximations if necessary (see <a href="option_help.html">options</a>). [ - Toggles pseudo_inlines mode on and off. When on, inline images which have no ALT string specified will have an "[INLINE]" pseudo-ALT string inserted in the Lynx display. When off, they will be treated as having ALT="" (i.e., they'll be ignored). If image_links mode is toggled on, the pseudo-ALT strings will be restored, to serve as links to the inline images' sources. ] - Sends a HEAD request for the current document or link. It applies only to documents or links (or form submit buttons) of http servers. A statusline message will notify you if the context for this command was inappropriate. The HEAD requests always are sent to the http server, i.e., Lynx does not retrieve any previous server replies from its cache. Note that for form submissions, http servers vary in whether they'll treat HEAD requests as valid and return the CGI script's headers, or treat it as invalid and return an error message. " - Toggles valid or "soft" double-quote parsing. When soft, a close-angle-bracket will serve as both a close-double- quote and close-tag, emulating the parsing bug in old versions of Mosaic and Netscape. CTRL-R - Reloads the current document and resets the display. CTRL-V - Switches to an alternative way of parsing HTML documents. This may help to get a more readable rendering of some documents with invalidly placed HTML tags, <a href= "option_help.html#tagsoup">more details</a>. CTRL-W - Resets or cleans up the display. CTRL-U - Clears text from an input field or prompt. CTRL-G - Cancels any input prompt, mail message or data transfer. CTRL-T - Toggles trace mode on and off. ; - Views the Lynx Trace Log for the current session. CTRL-K - Invokes the Cookie Jar Page. numbers - Lynx offers other, advanced navigation features when numbers are used to invoke the <a href= "follow_help.html">Follow link (or goto link or page) number:</a> or <a href= "follow_help.html#select-option">Select option (or page) number:</a> prompts. </pre> </body> </html>