CloudWatch Alarm

CloudWatch Alarm is an AWS resource that monitors metrics and triggers actions when defined thresholds are met. It can watch a single metric or the result of a math expression, and when conditions are breached, it can send notifications, perform Auto Scaling actions, or stop, start, or terminate instances. This helps automate responses to changes in application performance or system health.

aws.cloudwatch_metric_alarm

Fields

TitleIDTypeData TypeDescription
_keycorestring
account_idcorestring
actions_enabledcoreboolIndicates whether actions should be executed during any changes to the alarm state.
alarm_actionscorearray<string>The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
alarm_arncorestringThe Amazon Resource Name (ARN) of the alarm.
alarm_configuration_updated_timestampcoretimestampThe time stamp of the last update to the alarm configuration.
alarm_descriptioncorestringThe description of the alarm.
alarm_namecorestringThe name of the alarm.
comparison_operatorcorestringThe arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
datapoints_to_alarmcoreint64The number of data points that must be breaching to trigger the alarm.
dimensionscorejsonThe dimensions for the metric associated with the alarm.
evaluate_low_sample_count_percentilecorestringUsed only for alarms based on percentiles. If ignore, the alarm state does not change during periods with too few data points to be statistically significant. If evaluate or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
evaluation_periodscoreint64The number of periods over which data is compared to the specified threshold.
evaluation_statecorestringIf the value of this field is PARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.
extended_statisticcorestringThe percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
insufficient_data_actionscorearray<string>The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
metric_namecorestringThe name of the metric associated with the alarm, if this is an alarm based on a single metric.
metricscorejsonAn array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by having ReturnData set to true.
namespacecorestringThe namespace of the metric associated with the alarm.
ok_actionscorearray<string>The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
periodcoreint64The period, in seconds, over which the statistic is applied.
state_reasoncorestringAn explanation for the alarm state, in text format.
state_reason_datacorestringAn explanation for the alarm state, in JSON format.
state_transitioned_timestampcoretimestampThe date and time that the alarm's StateValue most recently changed.
state_updated_timestampcoretimestampThe time stamp of the last update to the value of either the StateValue or EvaluationState parameters.
state_valuecorestringThe state value for the alarm.
statisticcorestringThe statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ExtendedStatistic.
tagscorehstore
thresholdcorefloat64The value to compare with the specified statistic.
threshold_metric_idcorestringIn an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
treat_missing_datacorestringSets how this alarm is to handle missing data points. The valid values are breaching, notBreaching, ignore, and missing. For more information, see Configuring how CloudWatch alarms treat missing data. If this parameter is omitted, the default behavior of missing is used.
unitcorestringThe unit of the metric associated with the alarm.