mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Management framework: default to having agents check in with the (local) controller
This allows single-machine settings to work out of the box when agent and cluster are loaded in Supervisor mode.
This commit is contained in:
parent
b96a4276eb
commit
da016b8a68
1 changed files with 13 additions and 6 deletions
|
@ -3,6 +3,10 @@
|
||||||
@load policy/frameworks/management/config
|
@load policy/frameworks/management/config
|
||||||
@load policy/frameworks/management/types
|
@load policy/frameworks/management/types
|
||||||
|
|
||||||
|
# We source the controller configuration to obtain its network coordinates, so
|
||||||
|
# we can default to connecting to it.
|
||||||
|
@load policy/frameworks/management/controller/config
|
||||||
|
|
||||||
module Management::Agent;
|
module Management::Agent;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -45,12 +49,15 @@ export {
|
||||||
## suffixes this with "/<name>", based on :zeek:see:`Management::Agent::get_name`.
|
## suffixes this with "/<name>", based on :zeek:see:`Management::Agent::get_name`.
|
||||||
const topic_prefix = "zeek/management/agent" &redef;
|
const topic_prefix = "zeek/management/agent" &redef;
|
||||||
|
|
||||||
## The network coordinates of the controller. When defined, the agent
|
## The network coordinates of the controller. By default, the agent
|
||||||
## peers with (and connects to) the controller; otherwise the controller
|
## connects locally to the controller at its default port. Assigning
|
||||||
## will peer (and connect to) the agent, listening as defined by
|
## a :zeek:see:`Broker::NetworkInfo` record with IP address "0.0.0.0"
|
||||||
## :zeek:see:`Management::Agent::listen_address` and :zeek:see:`Management::Agent::listen_port`.
|
## means the controller should instead connect to the agent. If you'd
|
||||||
const controller: Broker::NetworkInfo = [
|
## like to use that mode, make sure to set
|
||||||
$address="0.0.0.0", $bound_port=0/unknown] &redef;
|
## :zeek:see:`Management::Agent::listen_address` and
|
||||||
|
## :zeek:see:`Management::Agent::listen_port` as needed.
|
||||||
|
const controller = Broker::NetworkInfo($address="127.0.0.1",
|
||||||
|
$bound_port=Management::Controller::network_info()$bound_port) &redef;
|
||||||
|
|
||||||
## An optional custom output directory for stdout/stderr. Agent and
|
## An optional custom output directory for stdout/stderr. Agent and
|
||||||
## controller currently only log locally, not via the Zeek cluster's
|
## controller currently only log locally, not via the Zeek cluster's
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue