mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Management framework: establish stdout/stderr files also for cluster nodes
This commit is contained in:
parent
da016b8a68
commit
e305d9c613
4 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue