mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

- fixing some Metrics::add_data() call signatures - slight refactors to cluster framework @if and adding a NONE NodeType for so local_node_type() will return that instead of just emitting an error when cluster mode isn't enabled - `make restdoc` target now uses bro's bare-mode - bro scripts generated from bifs now really only live in the build/src/base/ directory and changed the DocSourcesList.cmake to dynamically figure out what bifs exist by looking in src/ instead of build/src/ - add some missing @load dependencies
16 lines
386 B
Text
16 lines
386 B
Text
# @TEST-EXEC: bro %INPUT
|
|
# @TEST-EXEC: btest-diff metrics.log
|
|
|
|
redef enum Metrics::ID += {
|
|
TEST_METRIC,
|
|
};
|
|
|
|
event bro_init() &priority=5
|
|
{
|
|
Metrics::add_filter(TEST_METRIC,
|
|
[$name="foo-bar",
|
|
$break_interval=3secs]);
|
|
Metrics::add_data(TEST_METRIC, [$host=1.2.3.4], 3);
|
|
Metrics::add_data(TEST_METRIC, [$host=6.5.4.3], 2);
|
|
Metrics::add_data(TEST_METRIC, [$host=7.2.1.5], 1);
|
|
}
|