mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Misc. doc/script/test cleanup.
- 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
This commit is contained in:
parent
41dd0b98e9
commit
33fce8a71d
18 changed files with 42 additions and 39 deletions
16
testing/btest/scripts/base/frameworks/metrics/basic.bro
Normal file
16
testing/btest/scripts/base/frameworks/metrics/basic.bro
Normal file
|
@ -0,0 +1,16 @@
|
|||
# @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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue