policy/frameworks/cluster/agent/api.zeek¶
-
ClusterAgent::API
¶
The event API of cluster agents. Most endpoints consist of event pairs, where the agent answers a request event with a corresponding response event. Such event pairs share the same name prefix and end in “_request” and “_response”, respectively.
- Namespace
ClusterAgent::API
- Imports
base/frameworks/supervisor/control.zeek, policy/frameworks/cluster/controller/types.zeek
Summary¶
Constants¶
A simple versioning scheme, used to track basic compatibility of controller and agent. |
Events¶
The controller sends this event to convey that the agent is not currently required. |
|
Response to an agent_standby_request event. |
|
The controller sends this event to confirm to the agent that it is part of the current cluster topology. |
|
Response to an agent_welcome_request event. |
|
The agent sends this event upon peering as a “check-in”, informing the controller that an agent of the given name is now available to communicate with. |
|
The controller sends this event to convey a new cluster configuration to the agent. |
|
Response to a set_configuration_request event. |
Detailed Interface¶
Constants¶
- ClusterAgent::API::version¶
- Type
- Default
1
A simple versioning scheme, used to track basic compatibility of controller and agent.
Events¶
- ClusterAgent::API::agent_standby_request¶
-
The controller sends this event to convey that the agent is not currently required. This status may later change, depending on updates from the client, so the Broker-level peering can remain active. The agent releases any cluster-related resources (including shutdown of existing Zeek cluster nodes) when processing the request, and confirms via the response event. Shutting down an agent at this point has no operational impact on the running cluster.
- Reqid
a request identifier string, echoed in the response event.
- ClusterAgent::API::agent_standby_response¶
- Type
event
(reqid:string
, result:ClusterController::Types::Result
)
Response to an agent_standby_request event. The agent sends this back to the controller.
- Reqid
the request identifier used in the request event.
- Result
the result record.
- ClusterAgent::API::agent_welcome_request¶
-
The controller sends this event to confirm to the agent that it is part of the current cluster topology. The agent acknowledges with the corresponding response event.
- Reqid
a request identifier string, echoed in the response event.
- ClusterAgent::API::agent_welcome_response¶
- Type
event
(reqid:string
, result:ClusterController::Types::Result
)
Response to an agent_welcome_request event. The agent sends this back to the controller.
- Reqid
the request identifier used in the request event.
- Result
the result record.
- ClusterAgent::API::notify_agent_hello¶
-
The agent sends this event upon peering as a “check-in”, informing the controller that an agent of the given name is now available to communicate with. It is a controller-level equivalent of :zeek:see:`Broker::peer_added.
- Instance
an instance name, really the agent’s name as per
ClusterAgent::name
.- Host
the IP address of the agent. (This may change in the future.)
- Api_version
the API version of this agent.
- ClusterAgent::API::notify_change¶
- Type
event
(instance:string
, n:ClusterController::Types::Node
, old:ClusterController::Types::State
, new:ClusterController::Types::State
)
- ClusterAgent::API::set_configuration_request¶
- Type
event
(reqid:string
, config:ClusterController::Types::Configuration
)
The controller sends this event to convey a new cluster configuration to the agent. Once processed, the agent responds with the response event.
- Reqid
a request identifier string, echoed in the response event.
- Config
a
ClusterController::Types::Configuration
record describing the cluster topology. Note that this contains the full topology, not just the part pertaining to this agent. That’s because the cluster framework requires full cluster visibility to establish the needed peerings.
- ClusterAgent::API::set_configuration_response¶
- Type
event
(reqid:string
, result:ClusterController::Types::Result
)
Response to a set_configuration_request event. The agent sends this back to the controller.
- Reqid
the request identifier used in the request event.
- Result
the result record.