policy/frameworks/management/types.zeek
- Management
This module holds the basic types needed for the Management framework. These are used by both cluster agent and controller, and several have corresponding implementations in zeek-client.
- Namespace:
Management
Summary
Types
Data structure capturing a cluster’s complete configuration. |
|
Configuration describing a Zeek instance running a Cluster Agent. |
|
Configuration describing a Cluster Node process. |
|
In |
|
The status of a Supervisor-managed node, as reported to the client in a get_nodes_request/get_nodes_response transaction. |
|
A Zeek-side option with value. |
|
Return value for request-response API event pairs. |
|
Management infrastructure node type. |
|
State that a Cluster Node can be in. |
Functions
Given a |
|
Given a vector of |
Detailed Interface
Types
- Management::Configuration
- Type:
- Fields:
-
-
instances:
set[Management::Instance]&default={ }&optional The instances in the cluster.
-
nodes:
set[Management::Node]&default={ }&optional The set of nodes in the cluster, as distributed over the instances.
-
instances:
Data structure capturing a cluster’s complete configuration.
- Management::Instance
- Type:
- Fields:
Configuration describing a Zeek instance running a Cluster Agent. Normally, there’ll be one instance per cluster system: a single physical system.
- Management::Node
- Type:
- Fields:
-
-
role:
Supervisor::ClusterRole Role of the node.
-
state:
Management::State Desired, or current, run state.
-
options:
set[Management::Option]&optional Zeek options for node
-
role:
Configuration describing a Cluster Node process.
- Management::NodeOutputs
- Type:
- Fields:
In
Management::Controller::API::deploy_responseevents, eachManagement::Resultindicates the outcome of a launched cluster node. If a node does not launch properly (meaning it doesn’t check in with the agent on the machine it’s running on), the result will indicate failure, and its data field will be an instance of this record, capturing the stdout and stderr output of the failing node.
- Management::NodeStatus
- Type:
- Fields:
-
-
state:
Management::State Current run state of the node.
-
mgmt_role:
Management::Role&default=Management::NONE&optional Role the node plays in cluster management.
-
cluster_role:
Supervisor::ClusterRole&default=Supervisor::NONE&optional Role the node plays in the Zeek cluster.
-
state:
The status of a Supervisor-managed node, as reported to the client in a get_nodes_request/get_nodes_response transaction.
- Management::Option
-
A Zeek-side option with value.
- Management::Result
- Type:
- Fields:
Return value for request-response API event pairs. Some responses contain one, others multiple of these. The request ID allows clients to string requests and responses together. Agents and the controller fill in the instance and node fields whenever there’s sufficient context to define them. Any result produced by an agent will carry an instance value, for example.
- Management::Role
- Type:
-
- Management::NONE
No active role in cluster management
- Management::AGENT
A cluster management agent.
- Management::CONTROLLER
The cluster’s controller.
- Management::NODE
A managed cluster node (worker, manager, etc).
Management infrastructure node type. This intentionally does not include the managed cluster node types (worker, logger, etc) – those continue to be managed by the cluster framework.
- Management::State
- Type:
-
- Management::PENDING
Not yet running
- Management::RUNNING
Running and operating normally
- Management::STOPPED
Explicitly stopped
- Management::FAILED
Failed to start; and permanently halted
- Management::CRASHED
Crashed, will be restarted,
- Management::UNKNOWN
State not known currently (e.g., because of lost connectivity)
State that a Cluster Node can be in. State changes trigger an API notification (see notify_change()). The Pending state corresponds to the Supervisor not yet reporting a PID for a node when it has not yet fully launched.
Functions
- Management::result_to_string
- Type:
function(res:Management::Result) :string
Given a
Management::Resultrecord, this function returns a string summarizing it.
- Management::result_vec_to_string
- Type:
function(res:Management::ResultVec) :string
Given a vector of
Management::Resultrecords, this function returns a string summarizing them.