chore: add system metrics
This commit is contained in:
@@ -374,6 +374,33 @@ definitions:
|
||||
example: agent-001
|
||||
type: string
|
||||
type: object
|
||||
internal_handlers.AgentSystemMetricsOut:
|
||||
properties:
|
||||
connected_at:
|
||||
example: "2026-04-04 10:30:00"
|
||||
type: string
|
||||
cpu_percent:
|
||||
example: 45.2
|
||||
type: number
|
||||
disk_percent:
|
||||
example: 78.9
|
||||
type: number
|
||||
id:
|
||||
example: agent-001
|
||||
type: string
|
||||
label:
|
||||
example: web-server-1
|
||||
type: string
|
||||
memory_percent:
|
||||
example: 62.5
|
||||
type: number
|
||||
network_rx_bytes:
|
||||
example: 1048576
|
||||
type: number
|
||||
network_tx_bytes:
|
||||
example: 524288
|
||||
type: number
|
||||
type: object
|
||||
internal_handlers.CheckCmdIn:
|
||||
properties:
|
||||
command:
|
||||
@@ -619,6 +646,26 @@ paths:
|
||||
summary: Create registration token
|
||||
tags:
|
||||
- agents
|
||||
/agents/system-metrics:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns CPU, RAM, disk, and network usage metrics for all connected
|
||||
agents
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/internal_handlers.AgentSystemMetricsOut'
|
||||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get agent system metrics
|
||||
tags:
|
||||
- agents
|
||||
/auth/login:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user