16-CloudWatch
Module tạo CloudWatch Alarms cho monitoring ASG và ALB
Stage Modulemodules/16-cloudwatch
Alarms được tạo
| Alarm | Metric | Threshold |
|---|---|---|
| MILU2-stage-api-asg-cpu-high | CPUUtilization | > 80% |
| MILU2-stage-api-asg-cpu-low | CPUUtilization | < 20% |
| MILU2-stage-alb-5xx | HTTPCode_ELB_5XX_Count | > 10 |
| MILU2-stage-alb-latency | TargetResponseTime | > 5s |
Metrics
Các metrics được sử dụng từ AWS namespaces:
AWS/EC2- CPUUtilization, NetworkIn/OutAWS/ApplicationELB- HTTPCode_ELB_5XX_Count, TargetResponseTime, RequestCountAWS/AutoScaling- GroupDesiredCapacity, GroupInServiceInstances
Cảnh báo
Hiện tại alarms không có SNS topic để gửi notifications. Cần cấu hình thêm alarm_actions nếu muốn nhận alerts.
Outputs
| Tên | Mô tả |
|---|---|
| alarm_arns | List ARN của tất cả alarms |