mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add metrics to track string and container fields limited by length
This commit is contained in:
parent
cd74a4e138
commit
837fde1a08
10 changed files with 71 additions and 5 deletions
|
@ -2,9 +2,12 @@
|
|||
#
|
||||
# @TEST-EXEC: zeek -b test.zeek %INPUT
|
||||
# @TEST-EXEC: btest-diff test.log
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
# @TEST-START-FILE test.zeek
|
||||
|
||||
@load base/frameworks/telemetry
|
||||
|
||||
module Test;
|
||||
|
||||
export {
|
||||
|
@ -32,6 +35,13 @@ event zeek_init()
|
|||
}
|
||||
|
||||
Log::write(Test::LOG, rec);
|
||||
|
||||
local storage_metrics = Telemetry::collect_metrics("zeek", "log_writer_truncated*");
|
||||
for (i in storage_metrics)
|
||||
{
|
||||
local m = storage_metrics[i];
|
||||
print m$opts$metric_type, m$opts$prefix, m$opts$name, m$label_names, m$label_values, m$value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue