store only status-change events; UI client-side polling refactor

This commit is contained in:
Stanislav Rossovskii
2026-05-27 14:58:46 +04:00
parent 71f0035b0b
commit d5f312f200
48 changed files with 2247 additions and 753 deletions

View File

@@ -195,7 +195,7 @@ paths:
$ref: "#/components/responses/Unauthorized"
/api/v1/events/query:
get:
summary: Query stored events
summary: Query check status-change history
operationId: queryEvents
parameters:
- name: agent_id
@@ -368,11 +368,16 @@ components:
accepted:
type: integer
minimum: 0
description: Number of events stored on this request.
description: |
Number of events that produced a new status-change row on this request.
deduplicated:
type: integer
minimum: 0
description: Number of events whose `event_id` was already known.
description: |
Number of events that were not stored as a change. Includes events whose
`event_id` was already known, events whose `(status, exit_code)` matched
the previously observed value for the same check, and events received late
(older than the current `last_observed_at` of the check).
HeartbeatRequest:
type: object
additionalProperties: false
@@ -486,7 +491,11 @@ components:
type: string
maxLength: 256
StoredCheckResultEvent:
description: Stored event returned by `GET /events/query`. Includes the resolved `agent_id` and server-side `received_at`.
description: |
Stored status-change event returned by `GET /events/query`. The server persists
only events that change `(status, exit_code)` versus the previous observed value
for the same `(agent_id, check_id)`. Repeated identical results are not stored.
Includes the resolved `agent_id` and server-side `received_at`.
allOf:
- $ref: "#/components/schemas/CheckResultEvent"
- type: object
@@ -537,6 +546,9 @@ components:
type: integer
incident_key:
type: string
summary:
type: string
maxLength: 8192
Incident:
type: object
required: [id, incident_key, state, severity, opened_at]