API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · alarms

Alarm Schema

ID del esquema
alarm
Colección
alarms
Permisos
  • Leeralarm_view
  • Crearalarm_manage
  • Modificaralarm_manage
  • Eliminaralarm_manage
Relaciones

Campos

Alarm Schema

alarms4 permisos

ADR 0326 — stateful monitoring alarm (one doc per open dedupKey period), classified by the alarm rule stack.

statusstringobligatorio

Lifecycle: OPEN → ACKNOWLEDGED (in Bearbeitung) → RESOLVED (source sent CLEAR) | CLOSED (manual or auto_close action).

OPENACKNOWLEDGEDRESOLVEDCLOSED
solo lectura
isOpenbooleanobligatorio

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.

solo lectura
severitystringobligatorio

Display severity from the FIRST matching rule; fallback: severityHint mapping (critical→error) when no rule matched.

infowarningerror
solo lectura
canonicalSeveritystringopcional

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).

infowarningerrorcriticalnull
Valor por defecto: nullsolo lecturaadmite null
dedupKeystringobligatorio

Provider-scoped identity (ADR 0244) — passed through, never recomputed.

1–500 caracteressolo lectura
providerstringobligatorio

RMM provider id (octoja|riverbird|…).

máx. 40 caracteressolo lectura
connectionIdstringopcional

integration_config the events came from.

PatrónValor por defecto: nullsolo lecturaadmite null
errorTypestringopcional

Check name/category ("Fehlerart") — snapshot from the first RAISE.

máx. 500 caracteresValor por defecto: nullsolo lecturaadmite null
checkTypestringopcional

Normalized check type (RMM_CHECK_TYPES catalog value), null when unknown.

máx. 40 caracteresValor por defecto: nullsolo lecturaadmite null
messagestringopcional

Human-readable check output — updated on UPDATE events.

máx. 20000 caracteresValor por defecto: nullsolo lecturaadmite null
deviceNamestringopcional
máx. 500 caracteresValor por defecto: nullsolo lecturaadmite null
deviceCategorystringopcional

Normalized device category (RMM_DEVICE_CATEGORIES value).

máx. 40 caracteresValor por defecto: nullsolo lecturaadmite null
siteNamestringopcional
máx. 500 caracteresValor por defecto: nullsolo lecturaadmite null
customerNamestringopcional
máx. 500 caracteresValor por defecto: nullsolo lecturaadmite null
partyIdstringopcional
PatrónValor por defecto: nullsolo lecturaadmite null
rmmDeviceIdstringopcional
PatrónValor por defecto: nullsolo lecturaadmite null
assetIdstringopcional

CMDB asset of the device — snapshot of rmm_device.assetId at alarm creation; null = no match ("ohne Asset" marker in the UI).

PatrónValor por defecto: nullsolo lecturaadmite null
ticketIdstringopcional

Ticket created/attached by a create_ticket action.

PatrónValor por defecto: nullsolo lecturaadmite null
matchedRuleIdsuuid[]opcional

All rules that matched (evaluation transparency in the UI).

Valor por defecto: []solo lectura
suppressedByExceptionbooleanopcional

A rule matched but its exception suppressed all actions.

Valor por defecto: falsesolo lectura
pinnedbooleanopcional

OR over the matching rules — a pinned alarm cannot be hidden.

Valor por defecto: falsesolo lectura
hiddenByuuid[]opcional

Users who hid this alarm from their board (only when not pinned).

Valor por defecto: []solo lectura
acknowledgedBystringopcional
PatrónValor por defecto: nullsolo lecturaadmite null
acknowledgedAtdatetimeopcional
Valor por defecto: nullsolo lecturaadmite null
firstOccurredAtdatetimeopcional
Valor por defecto: nullsolo lecturaadmite null
lastEventAtdatetimeopcional
Valor por defecto: nullsolo lecturaadmite null
resolvedAtdatetimeopcional
Valor por defecto: nullsolo lecturaadmite null
closedBystringopcional

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.

Patrónsolo lecturaadmite null
closedAtdatetimeopcional

When the alarm was closed by hand (with closedBy).

solo lecturaadmite null
eventCountintegeropcional
≥ 0Valor por defecto: 1solo lectura
scheduledActionJobIdsstring[]opcional

Pending BullMQ action jobIds — best-effort cancel bookkeeping on CLEAR/ack.

Valor por defecto: []solo lectura
executedActionKeysstring[]opcional

Idempotency keys of actions that already fired. The authoritative dedup — BullMQ jobId dedup ends at removeOnComplete.

Valor por defecto: []solo lectura
evaluationModestringopcional

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).

rulesrecord
solo lectura
discardedbooleanopcional

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.

solo lectura
maintenancebooleanopcional

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.

solo lectura
deferredTicketobjectopcional

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.

solo lecturaadmite null

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 filtrable
  • GET /api/v1/alarms/<id> — Una entidad
  • POST /api/v1/alarms — Crear
  • PATCH /api/v1/alarms/<id> — Actualización parcial
  • DELETE /api/v1/alarms/<id> — Eliminación lógica
  • GET /api/v1/alarms/<id>/timeline — Auditoría y actividades

Búsqueda