Mercurial > wflogs-daemon
annotate xml/wflogs-daemon.in @ 2:400b1de6e1c6
allow multiple config contexts
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 17 May 2013 10:32:12 -0700 |
parents | 0aa1171aebd2 |
children | 37eace15ef87 |
rev | line source |
---|---|
0 | 1 <reference> |
2 <title>@PACKAGE@ - Version @VERSION@</title> | |
3 <partintro> | |
4 <title>Packages</title> | |
5 | |
6 <para>The various source and binary packages are available at <ulink | |
7 url="http://www.five-ten-sg.com/@PACKAGE@/packages/">http://www.five-ten-sg.com/@PACKAGE@/packages/</ulink> | |
8 The most recent documentation is available at <ulink | |
9 url="http://www.five-ten-sg.com/@PACKAGE@/">http://www.five-ten-sg.com/@PACKAGE@/</ulink> | |
10 </para> | |
11 | |
12 <para>A <ulink | |
13 url="http://www.selenic.com/mercurial/wiki/">Mercurial</ulink> source | |
14 code repository for this project is available at <ulink | |
15 url="http://hg.five-ten-sg.com/@PACKAGE@/">http://hg.five-ten-sg.com/@PACKAGE@/</ulink>. | |
16 </para> | |
17 | |
18 </partintro> | |
19 | |
20 <refentry id="@PACKAGE@.1"> | |
21 <refentryinfo> | |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
22 <date>2013-05-17</date> |
0 | 23 </refentryinfo> |
24 | |
25 <refmeta> | |
26 <refentrytitle>@PACKAGE@</refentrytitle> | |
27 <manvolnum>1</manvolnum> | |
28 <refmiscinfo>@PACKAGE@ @VERSION@</refmiscinfo> | |
29 </refmeta> | |
30 | |
31 <refnamediv id='name.1'> | |
32 <refname>@PACKAGE@</refname> | |
33 <refpurpose>daemon to periodically call wflogs</refpurpose> | |
34 </refnamediv> | |
35 | |
36 <refsynopsisdiv id='synopsis.1'> | |
37 <title>Synopsis</title> | |
38 <cmdsynopsis> | |
39 <command>@PACKAGE@</command> | |
40 <arg><option>-c</option></arg> | |
41 <arg><option>-d <replaceable class="parameter">n</replaceable></option></arg> | |
42 </cmdsynopsis> | |
43 </refsynopsisdiv> | |
44 | |
45 <refsect1 id='description.1'> | |
46 <title>Description</title> | |
47 | |
48 <para><command>@PACKAGE@</command> is a simple daemon to periodically | |
49 call wflogs to convert firewall logs to html.</para> | |
50 | |
51 <para>The <citerefentry> <refentrytitle>@PACKAGE@.conf</refentrytitle> | |
52 <manvolnum>5</manvolnum> </citerefentry> file specifies the syslog files | |
53 to be monitored, and the regular expressions (<citerefentry> | |
54 <refentrytitle>regex</refentrytitle> <manvolnum>7</manvolnum> | |
55 </citerefentry>) to be applied to new lines in those files. Each matching | |
56 line is written to a temp file used as input by wflogs.</para> | |
57 | |
58 <para>Considering syslog files in particular, these are normally rotated | |
59 via logrotate. <command>@PACKAGE@</command> properly detects and | |
60 handles this case by closing the old file, and reopening the newly | |
61 created file.</para> | |
62 </refsect1> | |
63 | |
64 <refsect1 id='options.1'> | |
65 <title>Options</title> | |
66 <variablelist> | |
67 <varlistentry> | |
68 <term>-c</term> | |
69 <listitem> | |
70 <para> | |
71 Load the configuration file, print a cannonical form | |
72 of the configuration on stdout, and exit. | |
73 </para> | |
74 </listitem> | |
75 </varlistentry> | |
76 <varlistentry> | |
77 <term>-d <replaceable class="parameter">n</replaceable></term> | |
78 <listitem> | |
79 <para> | |
80 Set the debug level to <replaceable class="parameter">n</replaceable>. | |
81 </para> | |
82 </listitem> | |
83 </varlistentry> | |
84 </variablelist> | |
85 </refsect1> | |
86 | |
87 <refsect1 id='usage.1'> | |
88 <title>Usage</title> | |
89 <para><command>@PACKAGE@</command> -d 2</para> | |
90 </refsect1> | |
91 | |
92 <refsect1 id='configuration.1'> | |
93 <title>Configuration</title> | |
94 <para> | |
95 The configuration file is documented in <citerefentry> | |
96 <refentrytitle>@PACKAGE@.conf</refentrytitle> <manvolnum>5</manvolnum> | |
97 </citerefentry>. Any change to the config file will cause it to be | |
98 reloaded within three minutes. | |
99 </para> | |
100 </refsect1> | |
101 | |
102 <refsect1 id='copyright.1'> | |
103 <title>Copyright</title> | |
104 <para> | |
105 Copyright (C) 2013 by 510 Software Group <carl@five-ten-sg.com> | |
106 </para> | |
107 <para> | |
108 This program is free software; you can redistribute it and/or modify it | |
109 under the terms of the GNU General Public License as published by the | |
110 Free Software Foundation; either version 3, or (at your option) any | |
111 later version. | |
112 </para> | |
113 <para> | |
114 You should have received a copy of the GNU General Public License along | |
115 with this program; see the file COPYING. If not, please write to the | |
116 Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
117 </para> | |
118 </refsect1> | |
119 | |
120 <refsect1 id='version.1'> | |
121 <title>Version</title> | |
122 <para> | |
123 @VERSION@ | |
124 </para> | |
125 </refsect1> | |
126 </refentry> | |
127 | |
128 | |
129 <refentry id="@PACKAGE@.conf.5"> | |
130 <refentryinfo> | |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
131 <date>2013-05-17</date> |
0 | 132 </refentryinfo> |
133 | |
134 <refmeta> | |
135 <refentrytitle>@PACKAGE@.conf</refentrytitle> | |
136 <manvolnum>5</manvolnum> | |
137 <refmiscinfo>@PACKAGE@ @VERSION@</refmiscinfo> | |
138 </refmeta> | |
139 | |
140 <refnamediv id='name.5'> | |
141 <refname>@PACKAGE@.conf</refname> | |
142 <refpurpose>configuration file for @PACKAGE@</refpurpose> | |
143 </refnamediv> | |
144 | |
145 <refsynopsisdiv id='synopsis.5'> | |
146 <title>Synopsis</title> | |
147 <cmdsynopsis> | |
148 <command>@PACKAGE@.conf</command> | |
149 </cmdsynopsis> | |
150 </refsynopsisdiv> | |
151 | |
152 <refsect1 id='description.5'> | |
153 <title>Description</title> | |
154 <para>The <command>@PACKAGE@.conf</command> configuration file is | |
155 specified by this partial bnf description. The entire config file | |
156 is case sensitive. All the keywords are lower case. | |
157 </para> | |
158 | |
159 <literallayout class="monospaced"><![CDATA[ | |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
160 CONFIG = {CONTEXT ";"}+ |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
161 CONTEXT = "context" NAME "{" {STATEMENT}+ "}" |
0 | 162 STATEMENT := (PERIOD | VERSIONS | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" |
163 PERIOD := "period" INTEGER-VALUE-SECONDS | |
164 VERSIONS := "versions" INTEGER-VALUE | |
165 OUTPUT := "output" OUTPUT-FILE-PATTERN | |
166 TEMPIN := "tempin" TEMP-FILE-NAME | |
167 WFLOGS := "wflogs" WFLOGS-COMMAND-PATTERN | |
168 FILE := "file" FILENAME "{" PATTERN+ "}" | |
169 PATTERN := "pattern" REGULAR-EXPRESSION]]></literallayout> | |
170 </refsect1> | |
171 | |
172 <refsect1 id='sample.5'> | |
173 <title>Sample</title> | |
174 <literallayout class="monospaced"><![CDATA[ | |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
175 context fast-response { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
176 period 120; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
177 versions 20; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
178 output "/var/www/html/firewall.0fast.%d.html"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
179 tempin "/tmp/wflogs.fast.input"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
180 wflogs "nice wflogs -i all -o html /tmp/wflogs.fast.input >%s &"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
181 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
182 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
183 }; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
184 |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
185 context daily { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
186 period 86400; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
187 versions 7; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
188 output "/var/www/html/firewall.1daily.%d.html"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
189 tempin "/tmp/wflogs.daily.input"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
190 wflogs "nice wflogs -i all -o html /tmp/wflogs.daily.input >%s &"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
191 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
192 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
193 }; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
194 |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
195 context weekly { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
196 period 604800; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
197 versions 4; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
198 output "/var/www/html/firewall.2weekly.%d.html"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
199 tempin "/tmp/wflogs.weekly.input"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
200 wflogs "nice wflogs -i all -o html /tmp/wflogs.weekly.input >%s &"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
201 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
202 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
203 };]]></literallayout> |
0 | 204 </refsect1> |
205 | |
206 <refsect1 id='version.5'> | |
207 <title>Version</title> | |
208 <para> | |
209 @VERSION@ | |
210 </para> | |
211 </refsect1> | |
212 | |
213 </refentry> | |
214 </reference> |