Mercurial > wflogs-daemon
annotate xml/wflogs-daemon.in @ 8:306059d0f677
fix missing return statement
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 17 May 2013 12:37:04 -0700 |
parents | 37eace15ef87 |
children |
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}+ "}" |
4
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
162 STATEMENT := (PERIOD | VERSIONS | TRIGGER | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" |
0 | 163 PERIOD := "period" INTEGER-VALUE-SECONDS |
164 VERSIONS := "versions" INTEGER-VALUE | |
4
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
165 TRIGGER := "trigger" ("hourly" | "daily" | "weekly") |
0 | 166 OUTPUT := "output" OUTPUT-FILE-PATTERN |
167 TEMPIN := "tempin" TEMP-FILE-NAME | |
168 WFLOGS := "wflogs" WFLOGS-COMMAND-PATTERN | |
169 FILE := "file" FILENAME "{" PATTERN+ "}" | |
170 PATTERN := "pattern" REGULAR-EXPRESSION]]></literallayout> | |
171 </refsect1> | |
172 | |
173 <refsect1 id='sample.5'> | |
174 <title>Sample</title> | |
175 <literallayout class="monospaced"><![CDATA[ | |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
176 context fast-response { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
177 period 120; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
178 versions 20; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
179 output "/var/www/html/firewall.0fast.%d.html"; |
4
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
180 tempin "/var/lib/wflogs-daemon/wflogs.fast.input"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
181 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.fast.input >%s &"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
182 file "/var/log/messages"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
183 pattern "vyatta kernel"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
184 }; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
185 |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
186 context hourly { |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
187 period 3600; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
188 versions 4; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
189 trigger hourly; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
190 output "/var/www/html/firewall.1hourly.%d.html"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
191 tempin "/var/lib/wflogs-daemon/wflogs.hourly.input"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
192 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.hourly.input >%s &"; |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
193 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
194 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
195 }; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
196 |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
197 context daily { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
198 period 86400; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
199 versions 7; |
4
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
200 trigger daily; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
201 output "/var/www/html/firewall.2daily.%d.html"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
202 tempin "/var/lib/wflogs-daemon/wflogs.daily.input"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
203 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.daily.input >%s &"; |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
204 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
205 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
206 }; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
207 |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
208 context weekly { |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
209 period 604800; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
210 versions 4; |
4
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
211 trigger weekly; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
212 output "/var/www/html/firewall.3weekly.%d.html"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
213 tempin "/var/lib/wflogs-daemon/wflogs.weekly.input"; |
37eace15ef87
allow hourly/daily/weekly triggers for output generation, append to temp wflogs input files so daemon restart won't drop as much data
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
214 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.weekly.input >%s &"; |
2
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
215 file "/var/log/messages"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
216 pattern "vyatta kernel"; |
400b1de6e1c6
allow multiple config contexts
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
217 };]]></literallayout> |
0 | 218 </refsect1> |
219 | |
220 <refsect1 id='version.5'> | |
221 <title>Version</title> | |
222 <para> | |
223 @VERSION@ | |
224 </para> | |
225 </refsect1> | |
226 | |
227 </refentry> | |
228 </reference> |