zeek/scripts/policy/frameworks/management/controller
Christian Kreibich 742f7fe340 Management framework: add auto-enumeration of metrics ports
This is quite redundant with the enumeration for Broker ports,
unfortunately. But the logic is subtly different: all nodes obtain a telemetry
port, while not all nodes require a Broker port, for example, and in the metrics
port assignment we also cross-check selected Broker ports. I found more unified
code actually harder to read in the end.

The logic for the two sets remains the same: from a start point, ports get
enumerated sequentially that aren't otherwise taken. These ports are assumed
available; there's nothing that checks their availability -- for now.

The default start port is 9000. I considered 9090, to align with the Prometheus
default, but counting upward from there is likely to hit trouble with the Broker
default ports (9999/9997), used by the Supervisor. Counting downward is a bit
unnatural, and shifting the Broker default ports brings subtle ordering issues.

This also changes the node ordering logic slightly since it seems more intuitive
to keep sequential ports on a given instance, instead of striping across them.
2024-07-08 23:05:24 -07:00
..
__load__.zeek Management framework: distinguish supervisor/supervisee when loading agent/controller 2022-05-25 13:56:23 -07:00
api.zeek Management framework: edit pass over docstrings 2022-06-22 23:26:11 -07:00
boot.zeek Update Management framework to new Supervisor::NodeConfig script fields 2022-09-02 12:12:19 -07:00
config.zeek Management framework: add auto-enumeration of metrics ports 2024-07-08 23:05:24 -07:00
main.zeek Management framework: add auto-enumeration of metrics ports 2024-07-08 23:05:24 -07:00