Skip to main content
The Agents components provide reusable UI elements for displaying agent information, status, and synchronization states.

AgentStatus

Displays the current status of a Wazuh agent with visual indicators. Location: plugins/main/public/components/agents/agent-status.tsx:21

Props

TAgentStatus
required
Agent status valuePossible values:
  • "active" - Agent is connected and reporting
  • "disconnected" - Agent is not connected
  • "never_connected" - Agent has never connected
  • "pending" - Agent is pending registration
Agent
Complete agent object for detailed status information
string
Custom label to display instead of default status text
React.CSSProperties
Custom styles to apply to the component

Usage

Custom Label

With Custom Styles

Status Codes

The component displays detailed status information when an agent object is provided:
status
Active - Agent is connected and sending events
status
Disconnected - Agent lost connection to manager
status
Never connected - Agent registered but never established connection
status
Pending - Agent is awaiting approval

AgentSynced

Displays the synchronization status of an agent. Location: plugins/main/public/components/agents/agent-synced.tsx

Props

Agent
required
Agent object containing synchronization information
boolean
default:true
Whether to show the “Synchronized” label

Usage

Without Title

ColumnWithStatusIcon

Generic component for displaying text with a colored status icon. Location: plugins/main/public/components/agents/column-with-status-icon.tsx

Props

string
required
Text to display
string
required
Color of the status indicatorPossible values:
  • "success" - Green indicator
  • "danger" - Red indicator
  • "warning" - Orange indicator
  • "subdued" - Gray indicator
  • Any valid EUI color
string
Tooltip text to show on hover

Usage

In a Table

Agent Stats Components

Components for displaying agent statistics and summaries.

AgentsSummary

Displays summary statistics for all agents. Location: plugins/main/public/components/agents/stats/agents-summary.tsx

Props

object
required
Agent summary data

Usage

Agent Prompts

Dialog components for agent management actions.

UpgradeAgentPrompt

Prompt for upgrading agents to a new version. Location: plugins/main/public/components/agents/prompts/upgrade-agent-prompt.tsx

Props

Agent[]
required
Array of agents to upgrade
() => void
required
Callback when the prompt is closed
() => void
Callback when upgrade succeeds

Usage

Syscollector Components

Components for displaying system inventory data from agents.

SyscollectorInventory

Displays hardware, packages, and system information for an agent. Location: plugins/main/public/components/agents/syscollector/

Props

Agent
required
Agent to display inventory for
string
Specific inventory section to display:
  • "hardware" - Hardware information
  • "packages" - Installed packages
  • "processes" - Running processes
  • "ports" - Open ports
  • "network" - Network interfaces

Usage

Type Definitions

TAgentStatus

Agent status type definition.

Agent

Agent object interface.

Utilities

Agent Status Helpers

Location: plugins/main/common/services/wz_agent_status.ts

agentStatusLabelByAgentStatus()

Get human-readable label for agent status.

agentStatusColorByAgentStatus()

Get color code for agent status.

Complete Example

Full example of an agent management interface:

Best Practices

When possible, pass the complete agent object to components for richer status information:
Show loading indicators while fetching agent data:
Agent status changes frequently. Implement auto-refresh:

Overview Components

Dashboard and statistics components

Main Plugin API

Core plugin functionality

Agent Management

Agent management guide

API Console

Test agent API endpoints