Implement Monlet MVP stack and UI updates
This commit is contained in:
@@ -14,6 +14,7 @@ paths:
|
||||
/api/v1/health:
|
||||
get:
|
||||
summary: Health check
|
||||
operationId: getHealth
|
||||
security: []
|
||||
responses:
|
||||
"200":
|
||||
@@ -25,6 +26,7 @@ paths:
|
||||
/api/v1/ready:
|
||||
get:
|
||||
summary: Readiness check
|
||||
operationId: getReady
|
||||
security: []
|
||||
responses:
|
||||
"200":
|
||||
@@ -42,6 +44,7 @@ paths:
|
||||
/api/v1/heartbeat:
|
||||
post:
|
||||
summary: Ingest agent heartbeat
|
||||
operationId: ingestHeartbeat
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -66,6 +69,7 @@ paths:
|
||||
/api/v1/events:
|
||||
post:
|
||||
summary: Ingest agent check result events
|
||||
operationId: ingestEvents
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -90,6 +94,7 @@ paths:
|
||||
/api/v1/agents:
|
||||
get:
|
||||
summary: List agents
|
||||
operationId: listAgents
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/Cursor"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -113,6 +118,7 @@ paths:
|
||||
/api/v1/agents/{agent_id}:
|
||||
get:
|
||||
summary: Get agent detail
|
||||
operationId: getAgent
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AgentId"
|
||||
responses:
|
||||
@@ -129,7 +135,15 @@ paths:
|
||||
/api/v1/checks:
|
||||
get:
|
||||
summary: List current check states
|
||||
operationId: listChecks
|
||||
parameters:
|
||||
- name: agent_id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 128
|
||||
pattern: "^[A-Za-z0-9._:-]+$"
|
||||
- $ref: "#/components/parameters/Cursor"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
responses:
|
||||
@@ -152,6 +166,7 @@ paths:
|
||||
/api/v1/incidents:
|
||||
get:
|
||||
summary: List incidents
|
||||
operationId: listIncidents
|
||||
parameters:
|
||||
- name: state
|
||||
in: query
|
||||
@@ -181,6 +196,7 @@ paths:
|
||||
/api/v1/events/query:
|
||||
get:
|
||||
summary: Query stored events
|
||||
operationId: queryEvents
|
||||
parameters:
|
||||
- name: agent_id
|
||||
in: query
|
||||
@@ -218,6 +234,7 @@ paths:
|
||||
/api/v1/notifiers/outbox:
|
||||
get:
|
||||
summary: List notification outbox items
|
||||
operationId: listOutbox
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/Cursor"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -358,7 +375,8 @@ components:
|
||||
description: Number of events whose `event_id` was already known.
|
||||
HeartbeatRequest:
|
||||
type: object
|
||||
required: [agent_id, observed_at, hostname, version]
|
||||
additionalProperties: false
|
||||
required: [agent_id, observed_at, hostname, features]
|
||||
properties:
|
||||
agent_id:
|
||||
type: string
|
||||
@@ -370,12 +388,8 @@ components:
|
||||
hostname:
|
||||
type: string
|
||||
maxLength: 253
|
||||
version:
|
||||
type: string
|
||||
maxLength: 64
|
||||
mode:
|
||||
type: string
|
||||
enum: [prometheus_only, push_only, hybrid]
|
||||
features:
|
||||
$ref: "#/components/schemas/AgentFeatures"
|
||||
labels:
|
||||
type: object
|
||||
maxProperties: 32
|
||||
@@ -385,9 +399,21 @@ components:
|
||||
additionalProperties:
|
||||
type: string
|
||||
maxLength: 256
|
||||
description: Up to 32 labels. Key max 64, value max 256.
|
||||
description: Up to 32 labels. Key max 64, value max 256. Monlet agents reserve `monlet_agent_version`. Secret-like keys are rejected.
|
||||
AgentFeatures:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [push, metrics]
|
||||
properties:
|
||||
push:
|
||||
type: boolean
|
||||
description: Agent pushes heartbeats/events to the server.
|
||||
metrics:
|
||||
type: boolean
|
||||
description: Agent exposes a Prometheus-compatible metrics endpoint.
|
||||
EventBatchRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [agent_id, events]
|
||||
properties:
|
||||
agent_id:
|
||||
@@ -402,6 +428,7 @@ components:
|
||||
$ref: "#/components/schemas/CheckResultEvent"
|
||||
CheckResultEvent:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: |
|
||||
Event body used inside `EventBatchRequest.events`. The owning `agent_id`
|
||||
is supplied once at the batch envelope; per-event `agent_id` is intentionally
|
||||
@@ -449,9 +476,10 @@ components:
|
||||
output_truncated:
|
||||
type: boolean
|
||||
default: false
|
||||
notification_owner:
|
||||
type: string
|
||||
enum: [server, prometheus, none]
|
||||
notifications_enabled:
|
||||
type: boolean
|
||||
default: true
|
||||
description: If false, the server stores state/incidents but does not enqueue notifications for this event.
|
||||
incident_key:
|
||||
type: string
|
||||
maxLength: 256
|
||||
@@ -471,7 +499,7 @@ components:
|
||||
format: date-time
|
||||
Agent:
|
||||
type: object
|
||||
required: [agent_id, hostname, status, last_seen_at]
|
||||
required: [agent_id, hostname, status, last_seen_at, features]
|
||||
properties:
|
||||
agent_id:
|
||||
type: string
|
||||
@@ -483,11 +511,8 @@ components:
|
||||
last_seen_at:
|
||||
type: string
|
||||
format: date-time
|
||||
version:
|
||||
type: string
|
||||
mode:
|
||||
type: string
|
||||
enum: [prometheus_only, push_only, hybrid]
|
||||
features:
|
||||
$ref: "#/components/schemas/AgentFeatures"
|
||||
labels:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
||||
Reference in New Issue
Block a user