Introduce telemetry framework

Adds base/frameworks/telemetry with wrappers around telemetry.bif
and updates telemetry/Manager to support collecting metrics from
script land.

Add policy/frameworks/telemetry/log for logging of metrics data
into a new telemetry.log and telemetry_histogram.log and add into
local.zeek by default.
This commit is contained in:
Arne Welzel 2022-06-30 17:01:13 +02:00
parent 95fba8fd29
commit 3fe930dbf2
32 changed files with 1950 additions and 27 deletions

View file

@ -12,3 +12,13 @@
# (json-logs.zeek activates this).
redef LogAscii::use_json = F;
@endif
# Exclude process metrics, they are non-deterministic.
redef Telemetry::log_prefixes -= { "process" };
# Prevent the version_info metric from being logged as it's not deterministic.
hook Telemetry::log_policy(rec: Telemetry::Info, id: Log::ID, filter: Log::Filter)
{
if ( rec$prefix == "zeek" && rec$name == "version_info" )
break;
}