base/frameworks/supervisor/control.zeek¶
-
SupervisorControl
¶
The Zeek process supervision (remote) control API. This defines a Broker topic prefix and events that can be used to control an external Zeek supervisor process. This API was introduced in Zeek 3.1.0 and considered unstable until 4.0.0. That is, it may change in various incompatible ways without warning or deprecation until the stable 4.0.0 release.
- Namespace
SupervisorControl
- Imports
Summary¶
Redefinable Options¶
When enabled, the Supervisor will listen on the configured Broker
|
|
The Broker topic prefix to use when subscribing to Supervisor API requests and when publishing Supervisor API responses. |
Events¶
Send a request to a remote Supervisor process to create a node. |
|
Handle a response from a Supervisor process that received
|
|
Send a request to a remote Supervisor process to destroy a node. |
|
Handle a response from a Supervisor process that received
|
|
Send a request to a remote Supervisor process to restart a node. |
|
Handle a response from a Supervisor process that received
|
|
Send a request to a remote Supervisor process to retrieve node status. |
|
Handle a response from a Supervisor process that received
|
|
Send a request to a remote Supervisor to stop and shutdown its process tree. |
Detailed Interface¶
Redefinable Options¶
- SupervisorControl::enable_listen¶
- Type
- Attributes
- Default
F
- Redefinition
from policy/frameworks/cluster/agent/boot.zeek
=
:T
When enabled, the Supervisor will listen on the configured Broker
Broker::default_listen_address
.
- SupervisorControl::topic_prefix¶
-
The Broker topic prefix to use when subscribing to Supervisor API requests and when publishing Supervisor API responses. If you are publishing Supervisor requests, this is also the prefix string to use for their topic names.
Events¶
- SupervisorControl::create_request¶
- Type
event
(reqid:string
, node:Supervisor::NodeConfig
)
Send a request to a remote Supervisor process to create a node.
- Reqid
an arbitrary string that will be directly echoed in the response
- Node
the desired configuration for the new supervised node process.
- SupervisorControl::create_response¶
-
Handle a response from a Supervisor process that received
SupervisorControl::create_request
.- Reqid
an arbitrary string matching the value in the original request.
- Result
the return value of the remote call to
Supervisor::create
.
- SupervisorControl::destroy_request¶
-
Send a request to a remote Supervisor process to destroy a node.
- Reqid
an arbitrary string that will be directly echoed in the response
- Node
the name of the node to destory or empty string to mean “all nodes”.
- SupervisorControl::destroy_response¶
-
Handle a response from a Supervisor process that received
SupervisorControl::destroy_request
.- Reqid
an arbitrary string matching the value in the original request.
- Result
the return value of the remote call to
Supervisor::destroy
.
- SupervisorControl::restart_request¶
-
Send a request to a remote Supervisor process to restart a node.
- Reqid
an arbitrary string that will be directly echoed in the response
- Node
the name of the node to restart or empty string to mean “all nodes”.
- SupervisorControl::restart_response¶
-
Handle a response from a Supervisor process that received
SupervisorControl::restart_request
.- Reqid
an arbitrary string matching the value in the original request.
- Result
the return value of the remote call to
Supervisor::restart
.
- SupervisorControl::status_request¶
-
Send a request to a remote Supervisor process to retrieve node status.
- Reqid
an arbitrary string that will be directly echoed in the response
- Node
the name of the node to get status of or empty string to mean “all nodes”.
- SupervisorControl::status_response¶
- Type
event
(reqid:string
, result:Supervisor::Status
)
Handle a response from a Supervisor process that received
SupervisorControl::status_request
.- Reqid
an arbitrary string matching the value in the original request.
- Result
the return value of the remote call to
Supervisor::status
.
- SupervisorControl::stop_request¶
- Type
event
()
Send a request to a remote Supervisor to stop and shutdown its process tree. There is no response to this message as the Supervisor simply terminates on receipt.