Table: aws_cloudwatch_alarms

This table shows data for Cloudwatch Alarms.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricAlarm.html (opens in a new tab)

The primary key for this table is arn.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
tagsjson
arn (PK)utf8
dimensionsjson
actions_enabledbool
alarm_actionslist<item: utf8, nullable>
alarm_arnutf8
alarm_configuration_updated_timestamptimestamp[us, tz=UTC]
alarm_descriptionutf8
alarm_nameutf8
comparison_operatorutf8
datapoints_to_alarmint64
evaluate_low_sample_count_percentileutf8
evaluation_periodsint64
evaluation_stateutf8
extended_statisticutf8
insufficient_data_actionslist<item: utf8, nullable>
metric_nameutf8
metricsjson
namespaceutf8
ok_actionslist<item: utf8, nullable>
periodint64
state_reasonutf8
state_reason_datautf8
state_transitioned_timestamptimestamp[us, tz=UTC]
state_updated_timestamptimestamp[us, tz=UTC]
state_valueutf8
statisticutf8
thresholdfloat64
threshold_metric_idutf8
treat_missing_datautf8
unitutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

Disabled CloudWatch alarm

SELECT
  'Disabled CloudWatch alarm' AS title,
  account_id,
  arn AS resource_id,
  'fail' AS status
FROM
  aws_cloudwatch_alarms
WHERE
  actions_enabled = false OR array_length(alarm_actions, 1) = 0;