zeek/doc/frameworks/telemetry/table-size-tracking.zeek
Tim Wojtulewicz adce4e604a Copy docs into Zeek repo directly
This is based on commit 99e6942efec5feff50523f6b2a1f5868f19ab638 from the
zeek-docs repo.
2025-10-13 11:06:48 -07:00

25 lines
791 B
Text

module Tunnel;
global tunnels_active_size_gf = Telemetry::register_gauge_family([
$prefix="zeek",
$name="monitored_tunnels_active",
$unit="1",
$help_text="Number of currently active tunnels as tracked in Tunnel::active"
]);
global tunnels_active_size_gauge = Telemetry::gauge_with(tunnels_active_size_gf);
global tunnels_active_footprint_gf = Telemetry::register_gauge_family([
$prefix="zeek",
$name="monitored_tunnels_active_footprint",
$unit="1",
$help_text="Footprint of the Tunnel::active table"
]);
global tunnels_active_footprint_gauge = Telemetry::gauge_with(tunnels_active_footprint_gf);
hook Telemetry::sync() {
Telemetry::gauge_set(tunnels_active_size_gauge, |Tunnel::active|);
Telemetry::gauge_set(tunnels_active_footprint_gauge, val_footprint(Tunnel::active));
}