Alarm Schema
Campos
Alarm Schema
ADR 0326 — stateful monitoring alarm (one doc per open dedupKey period), classified by the alarm rule stack.
status
Lifecycle: OPEN → ACKNOWLEDGED (in Bearbeitung) → RESOLVED (source sent CLEAR) | CLOSED (manual or auto_close action).
OPENACKNOWLEDGEDRESOLVEDCLOSEDisOpen
Computed: true while status is OPEN or ACKNOWLEDGED. Exists solely for the unique partial index (one open alarm per dedupKey) — always derive from status, never set independently.
severity
Display severity from the FIRST matching rule; fallback: severityHint mapping (critical→error) when no rule matched.
infowarningerrorcanonicalSeverity
Provider-mapped 4-level severity of the first RAISE (RmmSeverity). Kept alongside the 3-level display severity because ticket-priority policies are 4-level — the seeded default rule maps priorities from THIS field (fixed-policy parity).
infowarningerrorcriticalnulldedupKey
Provider-scoped identity (ADR 0244) — passed through, never recomputed.
provider
RMM provider id (octoja|riverbird|…).
connectionId
integration_config the events came from.
errorType
Check name/category ("Fehlerart") — snapshot from the first RAISE.
checkType
Normalized check type (RMM_CHECK_TYPES catalog value), null when unknown.
message
Human-readable check output — updated on UPDATE events.
deviceName
deviceCategory
Normalized device category (RMM_DEVICE_CATEGORIES value).
siteName
customerName
partyId
rmmDeviceId
assetId
CMDB asset of the device — snapshot of rmm_device.assetId at alarm creation; null = no match ("ohne Asset" marker in the UI).
ticketId
Ticket created/attached by a create_ticket action.
matchedRuleIds
All rules that matched (evaluation transparency in the UI).
suppressedByException
A rule matched but its exception suppressed all actions.
pinned
OR over the matching rules — a pinned alarm cannot be hidden.
acknowledgedBy
acknowledgedAt
firstOccurredAt
lastEventAt
resolvedAt
closedBy
The user who closed the alarm by hand („Problem erledigt", POST /alarms/:id/close). Set only by that route — never by the rule action auto_close. The NinjaOne outbound sweep resets the condition in NinjaOne only for alarms carrying it. Absent = closed by a rule/system, or before the field existed.
closedAt
When the alarm was closed by hand (with closedBy).
eventCount
scheduledActionJobIds
Pending BullMQ action jobIds — best-effort cancel bookkeeping on CLEAR/ack.
executedActionKeys
Idempotency keys of actions that already fired. The authoritative dedup — BullMQ jobId dedup ends at removeOnComplete.
evaluationMode
ADR 1115 — who decides about tickets: the alarm rule stack (rules) or the fixed ticket policy of the connection (record — the alarm only records the disturbance and links that ticket, no rule ever runs). Kept for the whole open period. Absent = rules (every alarm before ADR 1115).
rulesrecorddiscarded
ADR 1115 — no rule matched and the unmatched policy is discard: the alarm is kept (dedup slot, event history) but hidden from the board by default and never acted on. Absent = false.
maintenance
The alarm arose while its asset was in maintenance (`assets.maintenance`). A marker only: rule actions wait until the maintenance is over (and then run if the alarm is still open), the fixed ticket policy parks its ticket in `deferredTicket`. Absent = false.
deferredTicket
Record mode during an asset maintenance: the ticket the fixed policy would have created, rendered by the RMM adapter. Created by the alarm-consumer once the maintenance is over and the alarm is still open, then removed. Absent/null = nothing waiting.
Ningún campo coincide con el filtro.
Endpoints estándar
Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:
GET /api/v1/alarms— Lista, paginada y filtrableGET /api/v1/alarms/<id>— Una entidadPOST /api/v1/alarms— CrearPATCH /api/v1/alarms/<id>— Actualización parcialDELETE /api/v1/alarms/<id>— Eliminación lógicaGET /api/v1/alarms/<id>/timeline— Auditoría y actividades