comparison 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
comparison
equal deleted inserted replaced
1:964c1127ae65 2:400b1de6e1c6
17 17
18 </partintro> 18 </partintro>
19 19
20 <refentry id="@PACKAGE@.1"> 20 <refentry id="@PACKAGE@.1">
21 <refentryinfo> 21 <refentryinfo>
22 <date>2013-05-15</date> 22 <date>2013-05-17</date>
23 </refentryinfo> 23 </refentryinfo>
24 24
25 <refmeta> 25 <refmeta>
26 <refentrytitle>@PACKAGE@</refentrytitle> 26 <refentrytitle>@PACKAGE@</refentrytitle>
27 <manvolnum>1</manvolnum> 27 <manvolnum>1</manvolnum>
126 </refentry> 126 </refentry>
127 127
128 128
129 <refentry id="@PACKAGE@.conf.5"> 129 <refentry id="@PACKAGE@.conf.5">
130 <refentryinfo> 130 <refentryinfo>
131 <date>2013-05-15</date> 131 <date>2013-05-17</date>
132 </refentryinfo> 132 </refentryinfo>
133 133
134 <refmeta> 134 <refmeta>
135 <refentrytitle>@PACKAGE@.conf</refentrytitle> 135 <refentrytitle>@PACKAGE@.conf</refentrytitle>
136 <manvolnum>5</manvolnum> 136 <manvolnum>5</manvolnum>
155 specified by this partial bnf description. The entire config file 155 specified by this partial bnf description. The entire config file
156 is case sensitive. All the keywords are lower case. 156 is case sensitive. All the keywords are lower case.
157 </para> 157 </para>
158 158
159 <literallayout class="monospaced"><![CDATA[ 159 <literallayout class="monospaced"><![CDATA[
160 CONFIG = {STATEMENT}+ 160 CONFIG = {CONTEXT ";"}+
161 CONTEXT = "context" NAME "{" {STATEMENT}+ "}"
161 STATEMENT := (PERIOD | VERSIONS | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" 162 STATEMENT := (PERIOD | VERSIONS | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";"
162 PERIOD := "period" INTEGER-VALUE-SECONDS 163 PERIOD := "period" INTEGER-VALUE-SECONDS
163 VERSIONS := "versions" INTEGER-VALUE 164 VERSIONS := "versions" INTEGER-VALUE
164 OUTPUT := "output" OUTPUT-FILE-PATTERN 165 OUTPUT := "output" OUTPUT-FILE-PATTERN
165 TEMPIN := "tempin" TEMP-FILE-NAME 166 TEMPIN := "tempin" TEMP-FILE-NAME
169 </refsect1> 170 </refsect1>
170 171
171 <refsect1 id='sample.5'> 172 <refsect1 id='sample.5'>
172 <title>Sample</title> 173 <title>Sample</title>
173 <literallayout class="monospaced"><![CDATA[ 174 <literallayout class="monospaced"><![CDATA[
174 period 120; 175 context fast-response {
175 versions 3; 176 period 120;
176 output "/var/www/html/firewall.%d.html"; 177 versions 20;
177 tempin "/tmp/wflogs.input"; 178 output "/var/www/html/firewall.0fast.%d.html";
178 wflogs "wflogs -i all -o html /tmp/wflogs.input >%s"; 179 tempin "/tmp/wflogs.fast.input";
179 file "/var/log/messages"; 180 wflogs "nice wflogs -i all -o html /tmp/wflogs.fast.input >%s &";
180 pattern "vyatta kernel";]]></literallayout> 181 file "/var/log/messages";
182 pattern "vyatta kernel";
183 };
184
185 context daily {
186 period 86400;
187 versions 7;
188 output "/var/www/html/firewall.1daily.%d.html";
189 tempin "/tmp/wflogs.daily.input";
190 wflogs "nice wflogs -i all -o html /tmp/wflogs.daily.input >%s &";
191 file "/var/log/messages";
192 pattern "vyatta kernel";
193 };
194
195 context weekly {
196 period 604800;
197 versions 4;
198 output "/var/www/html/firewall.2weekly.%d.html";
199 tempin "/tmp/wflogs.weekly.input";
200 wflogs "nice wflogs -i all -o html /tmp/wflogs.weekly.input >%s &";
201 file "/var/log/messages";
202 pattern "vyatta kernel";
203 };]]></literallayout>
181 </refsect1> 204 </refsect1>
182 205
183 <refsect1 id='version.5'> 206 <refsect1 id='version.5'>
184 <title>Version</title> 207 <title>Version</title>
185 <para> 208 <para>