syslog-server/lib
Adam Moussa 680c571a7e feat(syslog-server): IaC-managed EC2 StatusCheckFailed alarm + auto-recovery (INFRA-58)
Add a CloudFormation-managed EC2 status-check alarm for the live syslog
instance, replacing the orphaned EC2-StatusCheck-syslog-server alarm that
still points at the terminated i-0a7470914f0151b97.

The instance is a CFN resource in this stack, so both alarms dimension on
instance.instanceId (Ref) rather than a literal id — they follow the
instance across future replacements (e.g. userDataCausesReplacement).

- EC2-StatusCheck-syslog-server: combined StatusCheckFailed, Maximum >= 1,
  300s period, 2 eval periods, treatMissingData=breaching, SNS -> site-alerts.
  Mirrors the existing Syslog-NoIncomingLogs SNS reference.
- EC2-StatusCheckSystem-syslog-server-recover: StatusCheckFailed_System with
  an EC2 recover action (+ SNS). AWS only allows RECOVER on the _System
  metric, not the combined metric, so it is a separate alarm;
  treatMissingData=notBreaching per AWS recovery-alarm guidance.

Validated with tsc, cdk synth, cfn-lint (W2001 bootstrap warning only).
The pre-existing orphaned alarm is deleted separately, not here.
2026-06-17 11:46:58 -04:00
..
syslog-server-stack.ts feat(syslog-server): IaC-managed EC2 StatusCheckFailed alarm + auto-recovery (INFRA-58) 2026-06-17 11:46:58 -04:00