Mercurial > wflogs-daemon
comparison xml/wflogs-daemon.in @ 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
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 17 May 2013 12:03:21 -0700 |
parents | 400b1de6e1c6 |
children |
comparison
equal
deleted
inserted
replaced
3:2ea606326f5b | 4:37eace15ef87 |
---|---|
157 </para> | 157 </para> |
158 | 158 |
159 <literallayout class="monospaced"><![CDATA[ | 159 <literallayout class="monospaced"><![CDATA[ |
160 CONFIG = {CONTEXT ";"}+ | 160 CONFIG = {CONTEXT ";"}+ |
161 CONTEXT = "context" NAME "{" {STATEMENT}+ "}" | 161 CONTEXT = "context" NAME "{" {STATEMENT}+ "}" |
162 STATEMENT := (PERIOD | VERSIONS | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" | 162 STATEMENT := (PERIOD | VERSIONS | TRIGGER | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" |
163 PERIOD := "period" INTEGER-VALUE-SECONDS | 163 PERIOD := "period" INTEGER-VALUE-SECONDS |
164 VERSIONS := "versions" INTEGER-VALUE | 164 VERSIONS := "versions" INTEGER-VALUE |
165 TRIGGER := "trigger" ("hourly" | "daily" | "weekly") | |
165 OUTPUT := "output" OUTPUT-FILE-PATTERN | 166 OUTPUT := "output" OUTPUT-FILE-PATTERN |
166 TEMPIN := "tempin" TEMP-FILE-NAME | 167 TEMPIN := "tempin" TEMP-FILE-NAME |
167 WFLOGS := "wflogs" WFLOGS-COMMAND-PATTERN | 168 WFLOGS := "wflogs" WFLOGS-COMMAND-PATTERN |
168 FILE := "file" FILENAME "{" PATTERN+ "}" | 169 FILE := "file" FILENAME "{" PATTERN+ "}" |
169 PATTERN := "pattern" REGULAR-EXPRESSION]]></literallayout> | 170 PATTERN := "pattern" REGULAR-EXPRESSION]]></literallayout> |
174 <literallayout class="monospaced"><![CDATA[ | 175 <literallayout class="monospaced"><![CDATA[ |
175 context fast-response { | 176 context fast-response { |
176 period 120; | 177 period 120; |
177 versions 20; | 178 versions 20; |
178 output "/var/www/html/firewall.0fast.%d.html"; | 179 output "/var/www/html/firewall.0fast.%d.html"; |
179 tempin "/tmp/wflogs.fast.input"; | 180 tempin "/var/lib/wflogs-daemon/wflogs.fast.input"; |
180 wflogs "nice wflogs -i all -o html /tmp/wflogs.fast.input >%s &"; | 181 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.fast.input >%s &"; |
182 file "/var/log/messages"; | |
183 pattern "vyatta kernel"; | |
184 }; | |
185 | |
186 context hourly { | |
187 period 3600; | |
188 versions 4; | |
189 trigger hourly; | |
190 output "/var/www/html/firewall.1hourly.%d.html"; | |
191 tempin "/var/lib/wflogs-daemon/wflogs.hourly.input"; | |
192 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.hourly.input >%s &"; | |
181 file "/var/log/messages"; | 193 file "/var/log/messages"; |
182 pattern "vyatta kernel"; | 194 pattern "vyatta kernel"; |
183 }; | 195 }; |
184 | 196 |
185 context daily { | 197 context daily { |
186 period 86400; | 198 period 86400; |
187 versions 7; | 199 versions 7; |
188 output "/var/www/html/firewall.1daily.%d.html"; | 200 trigger daily; |
189 tempin "/tmp/wflogs.daily.input"; | 201 output "/var/www/html/firewall.2daily.%d.html"; |
190 wflogs "nice wflogs -i all -o html /tmp/wflogs.daily.input >%s &"; | 202 tempin "/var/lib/wflogs-daemon/wflogs.daily.input"; |
203 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.daily.input >%s &"; | |
191 file "/var/log/messages"; | 204 file "/var/log/messages"; |
192 pattern "vyatta kernel"; | 205 pattern "vyatta kernel"; |
193 }; | 206 }; |
194 | 207 |
195 context weekly { | 208 context weekly { |
196 period 604800; | 209 period 604800; |
197 versions 4; | 210 versions 4; |
198 output "/var/www/html/firewall.2weekly.%d.html"; | 211 trigger weekly; |
199 tempin "/tmp/wflogs.weekly.input"; | 212 output "/var/www/html/firewall.3weekly.%d.html"; |
200 wflogs "nice wflogs -i all -o html /tmp/wflogs.weekly.input >%s &"; | 213 tempin "/var/lib/wflogs-daemon/wflogs.weekly.input"; |
214 wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.weekly.input >%s &"; | |
201 file "/var/log/messages"; | 215 file "/var/log/messages"; |
202 pattern "vyatta kernel"; | 216 pattern "vyatta kernel"; |
203 };]]></literallayout> | 217 };]]></literallayout> |
204 </refsect1> | 218 </refsect1> |
205 | 219 |