Mercurial > wflogs-daemon
diff 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 |
line wrap: on
line diff
--- a/xml/wflogs-daemon.in Fri May 17 10:37:25 2013 -0700 +++ b/xml/wflogs-daemon.in Fri May 17 12:03:21 2013 -0700 @@ -159,9 +159,10 @@ <literallayout class="monospaced"><![CDATA[ CONFIG = {CONTEXT ";"}+ CONTEXT = "context" NAME "{" {STATEMENT}+ "}" -STATEMENT := (PERIOD | VERSIONS | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" +STATEMENT := (PERIOD | VERSIONS | TRIGGER | OUTPUT | TEMPIN | WFLOGS | FILE | PATTERN) ";" PERIOD := "period" INTEGER-VALUE-SECONDS VERSIONS := "versions" INTEGER-VALUE +TRIGGER := "trigger" ("hourly" | "daily" | "weekly") OUTPUT := "output" OUTPUT-FILE-PATTERN TEMPIN := "tempin" TEMP-FILE-NAME WFLOGS := "wflogs" WFLOGS-COMMAND-PATTERN @@ -176,8 +177,19 @@ period 120; versions 20; output "/var/www/html/firewall.0fast.%d.html"; - tempin "/tmp/wflogs.fast.input"; - wflogs "nice wflogs -i all -o html /tmp/wflogs.fast.input >%s &"; + tempin "/var/lib/wflogs-daemon/wflogs.fast.input"; + wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.fast.input >%s &"; + file "/var/log/messages"; + pattern "vyatta kernel"; +}; + +context hourly { + period 3600; + versions 4; + trigger hourly; + output "/var/www/html/firewall.1hourly.%d.html"; + tempin "/var/lib/wflogs-daemon/wflogs.hourly.input"; + wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.hourly.input >%s &"; file "/var/log/messages"; pattern "vyatta kernel"; }; @@ -185,9 +197,10 @@ context daily { period 86400; versions 7; - output "/var/www/html/firewall.1daily.%d.html"; - tempin "/tmp/wflogs.daily.input"; - wflogs "nice wflogs -i all -o html /tmp/wflogs.daily.input >%s &"; + trigger daily; + output "/var/www/html/firewall.2daily.%d.html"; + tempin "/var/lib/wflogs-daemon/wflogs.daily.input"; + wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.daily.input >%s &"; file "/var/log/messages"; pattern "vyatta kernel"; }; @@ -195,9 +208,10 @@ context weekly { period 604800; versions 4; - output "/var/www/html/firewall.2weekly.%d.html"; - tempin "/tmp/wflogs.weekly.input"; - wflogs "nice wflogs -i all -o html /tmp/wflogs.weekly.input >%s &"; + trigger weekly; + output "/var/www/html/firewall.3weekly.%d.html"; + tempin "/var/lib/wflogs-daemon/wflogs.weekly.input"; + wflogs "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.weekly.input >%s &"; file "/var/log/messages"; pattern "vyatta kernel"; };]]></literallayout>