zeek/testing/btest/Files/zeromq/metrics.zeek
Arne Welzel c8307487d1 btest/cluster/zeromq: Add tests for overload behavior
The overload-drop.zeek and overload-no-drop.zeek tests have proxy,
worker-1 and worker-2 publish to the manager topic. For the drop
case, we verify that both, the senders, but also the manager drops
events. For the no-drop test, the HWMs are set such that all events
are buffered.

The overload-worker-proxy-topic*.zeek tests are similar, but instead
of publishing to the manager topic, proxy, worker-1 and worker-2 publish
to the proxy and worker topics to overload each other. This had
previously resulted in lockups and these tests verify that this doesn't
happen anymore.
2025-07-29 11:23:53 +02:00

20 lines
515 B
Text

module Cluster::Backend::ZeroMQ;
export {
global xpub_drops: function(): count;
global onloop_drops: function(): count;
}
function xpub_drops(): count
{
local ms = Telemetry::collect_metrics("zeek", "cluster_zeromq_xpub_drops_total");
assert |ms| == 1, fmt("%s", |ms|);
return double_to_count(ms[0]$value);
}
function onloop_drops(): count
{
local ms = Telemetry::collect_metrics("zeek", "cluster_zeromq_onloop_drops_total");
assert |ms| == 1, fmt("%s", |ms|);
return double_to_count(ms[0]$value);
}