Files
floci/docs/services
Priamo Germosen 23b66d557a feat(cloudwatch): evaluate PromQL alarms and list their contributors (#10050)
PutMetricAlarm takes EvaluationCriteria.PromQLCriteria over Query, JSON,
CBOR and CloudFormation, with the answers AWS gives: the members of an
alarm on a metric are refused as unnecessary, by name, and the
EvaluationInterval must be 10, 20, 30 or a multiple of 60. An interval
without criteria is now the ValidationError AWS answers, "EvaluationCriteria
is required when EvaluationInterval is specified", in place of Floci's
InvalidParameterCombination. A new PromQL alarm is in OK with "No time
series evaluated to ALARM", and DescribeAlarms echoes its criteria and
interval without the single-metric members.

The alarm evaluator runs the alarm's instant query once its interval has
passed, as the account that owns it. Each series returned is a
contributor, identified by its labels without __name__, as Prometheus
labels an alert. Contributors go to ALARM after PendingPeriod and back to
OK after RecoveryPeriod, as Prometheus's for and keep_firing_for move an
alert, at most 100 at a time, and the alarm is in ALARM while one is. A
failed or non-vector query is EVALUATION_ERROR and keeps the state;
more than 500 series is PARTIAL_DATA. A run is dropped when the alarm
changed while its query ran.

Each contributor change is an AlarmContributorStateUpdate history item
and a contributor-level SNS notification, with AlarmContributorId and
AlarmContributorAttributes and no NewStateReason or Trigger.
DescribeAlarmContributors lists the contributors in ALARM, and
DescribeAlarmHistory filters by AlarmContributorId. A query that returns
one series and ends in a comparison with a number drives Auto Scaling
step actions with that number as the threshold.

Floci's own choices where AWS documents none: the contributor history
summary and data, the empty contributor StateReason, the message for
criteria without an interval, EvaluationWindow among the unnecessary
members, and the evaluation error reasons.

Part of #7030.
2026-12-03 08:51:22 -04:00
..