You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command manager accepts command requests from Server's Engine and Management API as well as Indexer's Content manager.
These command requests are expanded into orders and written to the orders stream. Orders have information such as:
Note
This schema may change.
Source. One of [Users/Services (via Management API), Engine (via Management API), Content manager (directly)]
User. The user that originated the request. This user may represent a Management API or Indexer API user depending on the source.
Target. Cluster name destination.
Type. One of [Agent groups, Agent, Server cluster]
Action.
Type. One of One of [Agent groups, Agent, Server cluster]
Params. Additional parameters for the action.
Version. Version of the action.
Timeout. Number of seconds to wait for the command to be executed.
Status. One of [Pending, Sent, Success, Failure]
Result.
Code. Result code.
Message. Description of the result.
Data. Additional data.
Command Request ID. Unique identifier generated by the Command Manager. Auto-incremental.
Order ID. Unique identifier generated by the Command Manager. Auto-incremental within the same Command Request ID.
ID. Document ID. Generated combining the Order ID and the Command Request ID.
The command manager sends every order to its destination for execution by processing the orders stream.
Roughly speaking, the command manager is composed of two main parts:
API endpoints used to accept command requests and write the expanded orders in the orders stream.
A scheduler is used to process the orders stream and send every order to its destination for execution.
For Agents to poll for orders, they must use the Comms API's /commands endpoint. Agents must maintain this polling at all times by sending the /commands request in case it drops.
The orders stream must be maintained. Only relevant orders should be preserved, while the rest should be cleaned/archived.
For example:
The Management API sends a command requests to the Command manager's API to update agents in the Test group.
The Command manager API expands the command request and writes an update order per agent in the Test group in the orders stream.
The command manager scheduler processes the orders stream and sends every pending order to its destination for execution via the Management API /accept_commands endpoint.
The Management API /accept_commands endpoints distribute orders via the Server's cluster so that the update order is sent to every agent via the Comms API's /commands endpoints.
After every agent in the Test groups has been updated, they report back to the Comms API with the result.
The Comms API updates the order status in the orders stream based on the Agent's response.
Description
The command manager accepts command requests from Server's
Engine
andManagement API
as well as Indexer'sContent manager
.These command requests are expanded into orders and written to the orders stream. Orders have information such as:
Note
This schema may change.
The command manager sends every order to its destination for execution by processing the orders stream.
Roughly speaking, the command manager is composed of two main parts:
For Agents to poll for orders, they must use the Comms API's /commands endpoint. Agents must maintain this polling at all times by sending the /commands request in case it drops.
The orders stream must be maintained. Only relevant orders should be preserved, while the rest should be cleaned/archived.
For example:
Test
group.Test
group in the orders stream.Management API
/accept_commands endpoint.Test
groups has been updated, they report back to theComms API
with the result.Comms API
updates the order status in the orders stream based on the Agent's response.Functional requirements
Management API
.Plan
Spike
wazuh-indexer
packages #407MVP
Checkpoint
POST /events/stateful
endpoint when receiving commands results wazuh#25835Feature complete implementation
The text was updated successfully, but these errors were encountered: