Reference For: developers

API: alarms

Operations of the alarms tag of the native REST API.

Alarms

GET /v1/alarms

Lists alarm definitions with their states.

CLI
kyvernon alarms list

Parameters

NameInTypeRequiredDescription
targetquerystring or nullOnly alarms applicable to this target.

Responses

StatusDescriptionSchema
200OKarray of AlarmView

POST /v1/alarms

Defines an alarm.

CLI
kyvernon alarms create --body <json>

Request body

application/json: CreateAlarmRequest

NameTypeRequiredDescription
actionsarray of AlarmActionActions.
descriptionstringDescription.
enabledbooleanEnabled (default true).
namestringyesName.
scopeIdstringyesScope entity id.
triggerAlarmTriggeryesTrigger.

Responses

StatusDescriptionSchema
201CreatedAlarmView

POST /v1/alarms/clear-triggered

Resets triggered (non-green) alarm states to green (ClearTriggeredAlarms).

CLI
kyvernon alarms clear-triggered

Request body

application/json: ClearTriggeredAlarmsRequest

NameTypeRequiredDescription
statusesarray of AlarmStatusViewOnly clear these statuses; empty clears every non-green state.

Responses

StatusDescriptionSchema
204Done; no body

GET /v1/alarms/{id}

One alarm definition with its states.

CLI
kyvernon alarms get <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the alarm definition

Responses

StatusDescriptionSchema
200OKAlarmView

PUT /v1/alarms/{id}

Changes an alarm definition (Alarm.Edit on the alarm's scope). Absent fields keep their value; a new trigger resets the states of the alarm to gray (the next event or sample sets them again).

CLI
kyvernon alarms update <id> --disable

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the alarm definition

Request body

application/json: UpdateAlarmRequest

NameTypeRequiredDescription
actionsarray of AlarmAction or nullActions (replaces the list).
descriptionstring or nullDescription.
enabledboolean or nullEnabled. A disabled alarm is not evaluated.
expectedVersioninteger (int64) or nullVersion the client read (version of the alarm record); CONFLICT when it changed.
namestring or nullName.
scopeIdstring or nullScope entity id. A new scope needs Alarm.Create there and clears the states.
triggerAlarmTrigger or null

Responses

StatusDescriptionSchema
200OKAlarmView
400Invalid argument; the error body names the fieldErrorBody
404Not found (or not visible to the caller)ErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

DELETE /v1/alarms/{id}

Deletes an alarm.

CLI
kyvernon alarms delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the alarm definition

Responses

StatusDescriptionSchema
204Done; no body

POST /v1/alarms/{id}/acknowledge

Acknowledges an alarm on a target.

CLI
kyvernon alarms acknowledge <id> <target>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the alarm definition

Request body

application/json: AcknowledgeRequest

NameTypeRequiredDescription
targetIdstringyesEntity whose state is acknowledged.

Responses

StatusDescriptionSchema
204Done; no body

Version 0.1.