cluster/telemetry: Move topic_normalization redef to zeromq

This commit is contained in:
Arne Welzel 2025-06-26 15:22:09 +02:00
parent 22958f7cdf
commit 26f5166d7a
2 changed files with 4 additions and 1 deletions

View file

@ -29,7 +29,6 @@ export {
## Map to an empty string to skip recording a specific metric ## Map to an empty string to skip recording a specific metric
## completely. ## completely.
const topic_normalizations: table[pattern] of string = { const topic_normalizations: table[pattern] of string = {
[/^zeek\.cluster\.nodeid\..*/] = "zeek.cluster.nodeid.__normalized__",
[/^zeek\/cluster\/nodeid\/.*/] = "zeek/cluster/nodeid/__normalized__", [/^zeek\/cluster\/nodeid\/.*/] = "zeek/cluster/nodeid/__normalized__",
} &ordered &redef; } &ordered &redef;

View file

@ -257,6 +257,10 @@ function zeromq_nodeid_topic(id: string): string {
return nodeid_topic_prefix + "." + id + "."; return nodeid_topic_prefix + "." + id + ".";
} }
redef Cluster::Telemetry::topic_normalizations += {
[/^zeek\.cluster\.nodeid\..*/] = "zeek.cluster.nodeid.__normalized__",
};
# Unique identifier for this node with some debug information. # Unique identifier for this node with some debug information.
const my_node_id = fmt("zeromq_%s_%s_%s_%s", Cluster::node, gethostname(), getpid(), unique_id("N")); const my_node_id = fmt("zeromq_%s_%s_%s_%s", Cluster::node, gethostname(), getpid(), unique_id("N"));