Skip to content

Websocket communication #57

@eva672

Description

@eva672

Description

Replace the current TCP polling mechanism with WebSocket communication in wazuh-agent-status.
The goal is to establish a persistent connection between the client and server so that the client receives real-time agent status updates without polling.

Key tasks:

  • Add WebSocket server support in the background process (server binary).
  • Update client to subscribe to server via WebSocket.

Definition of Ready

  • Codebase is cloned and dependencies resolved.
  • Current TCP polling implementation is understood.

Acceptance Criteria

  • Client establishes persistent WebSocket connection to server.
  • Server broadcasts agent status changes to all connected clients.
  • Client updates tray icon / CLI immediately upon receiving status update.

Definition of Done

  • WebSocket server implemented in server binary.
  • Client binary consumes WebSocket messages instead of polling.
  • Unit and integration tests created for WebSocket communication.
  • Documentation updated (README, developer guide) with new WebSocket design and configuration (--use-websocket flag).
  • Manual test verified: stopping/starting Wazuh agent triggers immediate tray client update without polling.

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions