mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00

This changes the basic agent-management model to one in which the configurations received from the client define not just the data cluster, but also set the set of acceptable instances. Unless connectivity already exists, the controller will establish peerings with new agents that listen, or wait for ones that connect to the controller to check in. Once all required agents are available, the controller triggers the new notify_agents_ready event, an agent/controller-level "cluster-is-ready" event. The controller also uses this event to submit a pending config update to the now-ready instances.
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
@load base/frameworks/supervisor/control
|
|
@load policy/frameworks/cluster/controller/types
|
|
|
|
module ClusterAgent::API;
|
|
|
|
export {
|
|
const version = 1;
|
|
|
|
# Agent API events
|
|
|
|
global set_configuration_request: event(reqid: string,
|
|
config: ClusterController::Types::Configuration);
|
|
global set_configuration_response: event(reqid: string,
|
|
result: ClusterController::Types::Result);
|
|
|
|
# Notification events, agent -> controller
|
|
|
|
# Report agent being available.
|
|
global notify_agent_hello: event(instance: string, host: addr,
|
|
api_version: count);
|
|
|
|
# Report node state changes.
|
|
global notify_change: event(instance: string,
|
|
n: ClusterController::Types::Node,
|
|
old: ClusterController::Types::State,
|
|
new: ClusterController::Types::State);
|
|
|
|
# Report operational error.
|
|
global notify_error: event(instance: string, msg: string, node: string &default="");
|
|
|
|
# Report informational message.
|
|
global notify_log: event(instance: string, msg: string, node: string &default="");
|
|
|
|
# Notification events, controller -> agent
|
|
|
|
# Confirmation from controller in response to notify_agent_hello
|
|
# that the agent is welcome.
|
|
global notify_controller_hello: event(controller: string, host: addr);
|
|
|
|
}
|