Definitions

Definitions are used to configure alerts on how to observe a metric.

Data model

created_atstringTime when the definition was created (RFC3339). Read-only.
descriptionstringAdditional text that is included in the alert notification.
dimensionsobjectMore filters depending on the source type.
evaluation_strategyobjectCriteria on how to alert.
idstringA unique identifier for a definition. Read-only.
integration_idsarrayList of integrations used to notify when alert fires.
metricstringThe metric name to alert on for a specific source: domains, origins or stats.
namestringThe name of the alert definition.
objectstringThe resource type. Read-only. [Default definition]
service_idstringThe service on which the definition will alert on.
sourcestringThe source where the metric comes from.
updated_atstringTime when the definition was last updated (RFC3339). Read-only.

Domain derived metrics

In addition to the metrics provided by Domain Inspector (link), when choosing domains as a source, the following metric can also be used.

origin_offload_bytesnumberThe number of bytes offloaded to the edge.
status_4xx_ratenumberFraction of responses with 4xx codes delivered from domain. If there are no responses, this value will be 0.
status_5xx_ratenumberFraction of responses with 5xx codes delivered from domain. If there are no responses, this value will be 0.
status_gte_400_ratenumberFraction of responses with 4xx or 5xx codes delivered from domain. If there are no responses, this value will be 0.
status_lt_500_ratenumberFraction of responses with non-5xx codes delivered from domain. If there are no responses, this value will be 0.

Origin derived metrics

In addition to the metrics provided by Origin Inspector (link), when choosing origins as a source, the following metric can also be used.

all_bandwidthnumberThe amount of bandwidth from your origin.
all_status_4xx_ratenumberFraction of responses with 4xx codes delivered. If there are no responses, this value will be 0.
all_status_5xx_ratenumberFraction of responses with 5xx codes delivered. If there are no responses, this value will be 0.
all_status_gte_400_ratenumberFraction of responses with 4xx or 5xx codes delivered. If there are no responses, this value will be 0.
all_status_lt_500_ratenumberFraction of responses with non-5xx codes delivered. If there are no responses, this value will be 0.

Evaluation strategy data model

Criteria on how to alert.

periodstringThe length of time to evaluate whether the conditions have been met. The data is polled every minute.
thresholdnumberThreshold used to alert.
typestringType of strategy to use to evaluate.

Stats derived metrics

In addition to the metrics provided by historical stats (link), when choosing stats as a source, the following metric can also be used.

status_4xx_ratenumberFraction of responses with 4xx codes delivered. If there are no responses, this value will be 0.
status_5xx_ratenumberFraction of responses with 5xx codes delivered. If there are no responses, this value will be 0.
status_gte_400_ratenumberFraction of responses with 4xx or 5xx codes delivered. If there are no responses, this value will be 0.
status_lt_500_ratenumberFraction of responses with non-5xx codes delivered. If there are no responses, this value will be 0.

Endpoints

List definitions

GET/alerts/definitions

Create definition

POST/alerts/definitions

Read definition

GET/alerts/definitions/definition_id

Update definition

PUT/alerts/definitions/definition_id

Delete definition

DELETE/alerts/definitions/definition_id