mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00

- Use `-b` most everywhere, it will save time. - Start some intel tests upon the input file being fully read instead of at an arbitrary time. - Improve termination condition for some sumstats/cluster tests. - Filter uninteresting output from some supervisor tests. - Test for `notice_policy.log` is no longer needed.
25 lines
1 KiB
Text
25 lines
1 KiB
Text
# @TEST-EXEC: zeek -b -C -r $TRACES/wikipedia.trace %INPUT
|
|
# @TEST-EXEC: btest-diff reporter.log
|
|
# @TEST-EXEC: btest-diff http.log
|
|
# @TEST-EXEC: btest-diff http-2.log
|
|
# @TEST-EXEC: btest-diff http-3.log
|
|
# @TEST-EXEC: btest-diff http-2-2.log
|
|
|
|
@load base/protocols/http
|
|
@load base/frameworks/reporter
|
|
|
|
event zeek_init()
|
|
{
|
|
# Both the default filter for the http stream and this new one will
|
|
# attempt to have the same writer write to path "http", which will
|
|
# be reported as a warning and the path auto-corrected to "http-2"
|
|
local filter: Log::Filter = [$name="host-only", $include=set("host")];
|
|
# Same deal here, but should be auto-corrected to "http-3".
|
|
local filter2: Log::Filter = [$name="uri-only", $include=set("uri")];
|
|
# Conflict between auto-correct paths needs to be corrected, too, this
|
|
# time it will be "http-2-2".
|
|
local filter3: Log::Filter = [$path="http-2", $name="status-only", $include=set("status_code")];
|
|
Log::add_filter(HTTP::LOG, filter);
|
|
Log::add_filter(HTTP::LOG, filter2);
|
|
Log::add_filter(HTTP::LOG, filter3);
|
|
}
|