mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Add necessary script-land changes
This commit is contained in:
parent
c2bd0cb4c7
commit
73192c0f63
6 changed files with 148 additions and 34 deletions
|
@ -2,9 +2,9 @@
|
|||
##! Prometheus exposition and import all metrics from the
|
||||
##! `zeek/cluster/metrics/...` topic.
|
||||
##!
|
||||
##! For customization or disabling, redef the involved Broker options again.
|
||||
##! Specifically, to disable listening on port 9911, set
|
||||
##! :zeek:see:`Broker::metrics_port` to `0/unknown` again.
|
||||
##! For customization or disabling, redef the involved Telemetry options
|
||||
##! again. Specifically, to disable listening on port 9911, set
|
||||
##! :zeek:see:`Telemetry::metrics_port` to `0/unknown` again.
|
||||
##!
|
||||
##! Note that in large clusters, metrics import may cause significant
|
||||
##! communication overhead as well as load on the manager.
|
||||
|
@ -14,15 +14,15 @@
|
|||
@if ( Cluster::is_enabled() )
|
||||
|
||||
# Use Cluster::node as "endpoint" label
|
||||
redef Broker::metrics_export_endpoint_name = Cluster::node;
|
||||
redef Telemetry::metrics_export_endpoint_name = Cluster::node;
|
||||
|
||||
# The manager opens port 9911 and imports metrics from all nodes by default.
|
||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
||||
redef Broker::metrics_port = 9911/tcp;
|
||||
redef Broker::metrics_import_topics = vector("zeek/cluster/metrics/");
|
||||
redef Telemetry::metrics_port = 9911/tcp;
|
||||
redef Telemetry::metrics_import_topics = vector("zeek/cluster/metrics/");
|
||||
|
||||
@else
|
||||
redef Broker::metrics_export_topic = "zeek/cluster/metrics/";
|
||||
redef Telemetry::metrics_export_topic = "zeek/cluster/metrics/";
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue