policy/frameworks/management/node/api.zeek

Management::Node::API

The Management event API of cluster nodes. The API consists of request/ response event pairs, like elsewhere in the Management, Supervisor, and Control frameworks.

Namespace

Management::Node::API

Imports

policy/frameworks/management/types.zeek

Summary

Events

Management::Node::API::node_dispatch_request: event

Management agents send this event to every Zeek cluster node to run a “dispatch” – a particular, pre-implemented action.

Management::Node::API::node_dispatch_response: event

Response to a node_dispatch_request event.

Management::Node::API::notify_node_hello: event

The cluster nodes send this event upon peering as a “check-in” to the agent, to indicate the node is now available to communicate with.

Detailed Interface

Events

Management::Node::API::node_dispatch_request
Type

event (reqid: string, action: vector of string, nodes: set [string] &default = {  } &optional)

Management agents send this event to every Zeek cluster node to run a “dispatch” – a particular, pre-implemented action. This is the agent-node complement to Management::Agent::API::node_dispatch_request.

Parameters
  • reqid – a request identifier string, echoed in the response event.

  • action – the requested dispatch command, with any arguments.

  • nodes – the cluster node names this dispatch targets. An empty set, supplied by default, means it applies to all nodes. Since nodes receive all dispatch requests, they can use any node names provided here to filter themselves out of responding.

Management::Node::API::node_dispatch_response
Type

event (reqid: string, result: Management::Result)

Response to a node_dispatch_request event. The nodes send this back to the agent. This is the agent-node equivalent of Management::Agent::API::node_dispatch_response.

Parameters
  • reqid – the request identifier used in the request event.

  • result – a Management::Result record covering one Zeek cluster node managed by the agent. Upon success, the data field contains a value appropriate for the requested dispatch.

Management::Node::API::notify_node_hello
Type

event (node: string)

The cluster nodes send this event upon peering as a “check-in” to the agent, to indicate the node is now available to communicate with. It is an agent-level equivalent of Broker::peer_added, and similar to Management::Agent::API::notify_agent_hello for agents.

Parameters

node – the name of the node, as given in Cluster::node.