feat(backend): implement service monitor proto & connect it to http /agents
ci-agent / build (push) Has been cancelled

This commit is contained in:
2026-04-04 19:59:32 +03:00
parent 1d75935a08
commit eb2ca590a9
8 changed files with 99 additions and 14 deletions
+18 -4
View File
@@ -23,6 +23,9 @@ const docTemplate = `{
}
],
"description": "Returns a list of all agents currently connected via Collector (log streaming)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
@@ -1966,19 +1969,30 @@ const docTemplate = `{
"type": "object",
"properties": {
"connected_at": {
"type": "string"
"description": "Time when agent connected (RFC3339-like)",
"type": "string",
"example": "2026-04-04 10:30:00"
},
"label": {
"type": "string"
"description": "Human-readable label",
"type": "string",
"example": "web-server-1"
},
"services": {
"description": "List of services with status (format: \"name:status\")",
"type": "array",
"items": {
"type": "string"
}
},
"example": [
"nginx:running",
"redis:up"
]
},
"token": {
"type": "string"
"description": "Unique agent identifier",
"type": "string",
"example": "agent-001"
}
}
},
+18 -4
View File
@@ -12,6 +12,9 @@
}
],
"description": "Returns a list of all agents currently connected via Collector (log streaming)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
@@ -1955,19 +1958,30 @@
"type": "object",
"properties": {
"connected_at": {
"type": "string"
"description": "Time when agent connected (RFC3339-like)",
"type": "string",
"example": "2026-04-04 10:30:00"
},
"label": {
"type": "string"
"description": "Human-readable label",
"type": "string",
"example": "web-server-1"
},
"services": {
"description": "List of services with status (format: \"name:status\")",
"type": "array",
"items": {
"type": "string"
}
},
"example": [
"nginx:running",
"redis:up"
]
},
"token": {
"type": "string"
"description": "Unique agent identifier",
"type": "string",
"example": "agent-001"
}
}
},
+12
View File
@@ -306,14 +306,24 @@ definitions:
internal_handlers.AgentInfo:
properties:
connected_at:
description: Time when agent connected (RFC3339-like)
example: "2026-04-04 10:30:00"
type: string
label:
description: Human-readable label
example: web-server-1
type: string
services:
description: 'List of services with status (format: "name:status")'
example:
- nginx:running
- redis:up
items:
type: string
type: array
token:
description: Unique agent identifier
example: agent-001
type: string
type: object
internal_handlers.InsertLogRequest:
@@ -397,6 +407,8 @@ info:
paths:
/agents:
get:
consumes:
- application/json
description: Returns a list of all agents currently connected via Collector
(log streaming)
produces: