diff --git a/scripts/policy/frameworks/management/agent/boot.zeek b/scripts/policy/frameworks/management/agent/boot.zeek index 5863b0517d..d906b21558 100644 --- a/scripts/policy/frameworks/management/agent/boot.zeek +++ b/scripts/policy/frameworks/management/agent/boot.zeek @@ -4,6 +4,8 @@ ##! ##! If the current process is not the Zeek supervisor, this does nothing. +@load base/utils/paths + @load ./config # The agent needs the supervisor to listen for node management requests. We diff --git a/scripts/policy/frameworks/management/agent/main.zeek b/scripts/policy/frameworks/management/agent/main.zeek index 117dc3f1c9..a623fa4e5b 100644 --- a/scripts/policy/frameworks/management/agent/main.zeek +++ b/scripts/policy/frameworks/management/agent/main.zeek @@ -4,6 +4,8 @@ ##! supervisor. @load base/frameworks/broker +@load base/utils/paths + @load policy/frameworks/management @load policy/frameworks/management/node/api @load policy/frameworks/management/node/config @@ -204,6 +206,11 @@ event Management::Agent::API::set_configuration_request(reqid: string, config: M # node. nc$scripts[|nc$scripts|] = "policy/frameworks/management/node"; + if ( Management::Node::stdout_file != "" ) + nc$stdout_file = Management::Node::stdout_file; + if ( Management::Node::stderr_file != "" ) + nc$stderr_file = Management::Node::stderr_file; + # XXX could use options to enable per-node overrides for # directory, stdout, stderr, others? diff --git a/scripts/policy/frameworks/management/controller/boot.zeek b/scripts/policy/frameworks/management/controller/boot.zeek index f592e6b7a1..aaafca8c96 100644 --- a/scripts/policy/frameworks/management/controller/boot.zeek +++ b/scripts/policy/frameworks/management/controller/boot.zeek @@ -5,6 +5,8 @@ ##! ##! If the current process is not the Zeek supervisor, this does nothing. +@load base/utils/paths + @load ./config event zeek_init() diff --git a/scripts/policy/frameworks/management/node/config.zeek b/scripts/policy/frameworks/management/node/config.zeek index d17fd663a1..e15631aa87 100644 --- a/scripts/policy/frameworks/management/node/config.zeek +++ b/scripts/policy/frameworks/management/node/config.zeek @@ -6,4 +6,17 @@ export { ## The nodes' Broker topic. Cluster nodes automatically subscribe ## to it, to receive request events from the Management framework. const node_topic = "zeek/management/node" &redef; + + ## Cluster node stdout log configuration. If the string is non-empty, + ## Zeek will produce a free-form log (i.e., not one governed by Zeek's + ## logging framework) in the node's working directory. If left empty, no + ## such log results. + ## + ## Note that cluster nodes also establish a "proper" management log via + ## the :zeek:see:`Management::Log` module. + const stdout_file = "stdout" &redef; + + ## Cluster node stderr log configuration. Like + ## :zeek:see:`Management::Node::stdout_file`, but for the stderr stream. + const stderr_file = "stderr" &redef; }