Skip to main content

Alerts 🆕

Introduction​

Alerts are issues that happen outside the scope of user interaction.

The following alert types are defined in the platform:

TypeDescription
MetricAlertUser definable metrics that alert you when a threshold has been breached
DatasetAlertBoth system generated alerts about late or bad quality data and manually curated messages about datasets
SystemAlertIssues raised by the platform about incorrect configuration or general issues
ServiceAlertService specific alerts that are raised by the system

Alerts and Alert Records​

An alert is the configuration information for an alert type whereas an alert record is an actual alert that been raised against an alert type.

Alert Configuration​

The configuration of an alert is alert type specific as defined in this section.

MetricAlert​

A MetricAlert has the following properties:

NameTypeDescription
iduidUnique id for this alert
typeStringAlways MetricAlert
nameStringThe unique name of this MetricAlert
descriptionStringA description of this alert
impactStringThe default impact of this alert
checkFrequencyStringHow often to test the metric to see if it has breached the threshold, e.g. 15m
metricStringThe name of the metric in the format provider/metric
lookbackStringThe duration to look back to aggregate the metrics, e.g. 5m
observedStringThe aggregation method, e.g. summed
operatorStringThe operator to use to check the threshold, one of gt, gte, lt, lte
absoluteThresholdDoubleThe absolute threshold to validate against
dynamicThresholdFunctionStringThe threshold function to use if calculating a dynamic threshold, one of min, max, mean, median
dynamicThresholdRangeStringThe range to calculate the dynamic threshold, usually a between function
filterString (json)An optional filter used to filter the metrics

DatasetAlert​

A DatasetAlert has the following properties:

NameTypeDescription
iduidUnique id for this alert
typeStringAlways MetricAlert
nameStringThe unique name of this MetricAlert
descriptionStringA description of this alert
impactStringThe default impact of this alert
dsidStringThe dataset id

SystemAlert​

A SystemAlert has the following properties:

NameTypeDescription
iduidUnique id for this alert
typeStringAlways MetricAlert
nameStringThe unique name of this MetricAlert
descriptionStringA description of this alert
impactStringThe default impact of this alert

ServiceAlert​

A ServiceAlert has the following properties:

NameTypeDescription
iduidUnique id for this alert
typeStringAlways MetricAlert
nameStringThe unique name of this MetricAlert
descriptionStringA description of this alert
impactStringThe default impact of this alert
serviceStringThe name of the service
keyStringAn optional key for alerts about a specific entity within the service

Subscribing To Alerts​

You can subscribe to alerts in the same way you can subscribe to anything in the platform.

The important parts of the item that you subscribe to are:

  • service = alertrecord
  • id = alert type/alert name, e.g. DatasetAlert/ICE.NDEX.NLB

Subscription Example​

a = Subscription()
a.addItem(ref("alertrecord", "DatasetAlert/ICE.NDEX.NLB"))
a.addEmailTarget("user@opendatadsl.com", "ALERT: ICE.NDEX.NLB", "#VarAlertRecord", false)
a.enabled = true
a.name = "My Dataset Alert Subscription"
save a