

# OPS10-BP02 针对每个警报设置一个流程
<a name="ops_event_response_process_per_alert"></a>

 要想实现有效和高效的事件管理，为系统中的每个警报建立清晰明确的流程至关重要。这种做法可确保对每个警报都采取具体的、可操作的响应，从而提高运营的可靠性和响应能力。

 **期望结果：**每个警报都会启动一个具体的、明确的响应计划。在可能的情况下，将响应过程自动化，并具有明确的负责人和上报路径。警报关联到最新的知识库，以便所有操作员都可以一致、有效地做出响应。响应速度快且全面统一，从而提高运营效率和可靠性。

 **常见反模式：**
+  没有针对警报预定义响应流程，导致采用了不及时的权宜解决方案。
+  警报过载会导致遗漏重要的警报。
+  由于缺乏明确的责任人和责任关系，警报的处理方式不一致。

 **建立此最佳实践的好处：**
+  仅发出可操作的警报，缓解警报疲劳情况。
+  缩短了运营问题的平均解决时间（MTTR）。
+  缩短了平均调查时间（MTTI)，这有助于减少 MTTR。
+  增强了大范围运营响应的能力。
+  提高了处理运营事件的一致性和可靠性。

 例如，您为关键客户的 AWS Health 事件定义了一个流程，包括应用程序警报、运营问题和计划的生命周期事件（例如，在自动更新集群之前更新 Amazon EKS 版本），并且您为团队提供了主动监控、沟通和响应这些事件的功能。这些操作有助于防止由 AWS 方更改所造成的服务中断，或在出现意外问题时更快地缓解此类中断。

 **在未建立这种最佳实践的情况下暴露的风险等级：**高 

## 实施指导
<a name="implementation-guidance"></a>

 针对每个警报设置一个流程，这包括为每个警报制定明确的响应计划，尽可能自动处理响应，并根据运营反馈和不断变化的要求不断完善这些流程。

### 实施步骤
<a name="implementation-steps"></a>

 下图说明了 [AWS Systems Manager Incident Manager](https://aws.amazon.com/systems-manager/features/incident-manager/) 中的事件管理工作流程。此服务旨在通过自动创建意外事件来响应 [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) 或 [Amazon EventBridge](https://aws.amazon.com/eventbridge/) 中的特定事件，从而快速响应运营问题。创建意外事件时，无论是自动还是手动创建，Incident Manager 都会集中管理意外事件，整理相关的 AWS 资源信息，并启动预定义的响应计划。这包括运行 Systems Manager Automation 运行手册，从而立即采取行动，以及在 OpsCenter 中创建父运营工作项，用于跟踪相关任务和分析。这种简化的流程可以加快和协调整个 AWS 环境中的意外事件响应。

![\[描述 Incident Manager 工作原理的流程图 – 聊天应用程序中的 Amazon Q 开发者版，上报计划和联系方式，运行手册流入响应计划，响应计划流入意外事件和分析。Amazon CloudWatch 也将流入响应计划。\]](http://docs.aws.amazon.com/zh_cn/wellarchitected/latest/framework/images/incident-manager-how-it-works.png)


 

1.  **使用复合警报：**在 CloudWatch 中创建[复合警报](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html)，以便对相关警报进行分组，减少噪音并实现更有意义的响应。

1.  **随时了解 [AWS Health](https://docs.aws.amazon.com/health/latest/ug/what-is-aws-health.html) 的最新信息：**AWS Health 是有关 AWS 云资源运行状况的权威信息来源。使用 AWS Health 可视化并获得有关任何当前服务事件和即将发生的更改（例如计划的生命周期事件）的通知，以便您可以采取措施来减轻影响。

   1.  通过 [AWS 用户通知服务](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html) 创建要发送到电子邮件和聊天渠道且[契合目标的 AWS Health 事件通知](https://docs.aws.amazon.com/health/latest/ug/user-notifications.html)，并通过 Amazon EventBridge 或 [AWS Health API](https://docs.aws.amazon.com/health/latest/APIReference/Welcome.html) 以编程方式与[监控和警报工具](https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html)集成。

   1.  通过与您可能已经通过 Amazon EventBridge 或 AWS Health API 使用的变更管理或 ITSM 工具（如 [Jira](https://docs.aws.amazon.com/smc/latest/ag/cloud-sys-health.html) 或 [ServiceNow](https://docs.aws.amazon.com/smc/latest/ag/sn-aws-health.html)）集成，规划和跟踪需要采取行动的运行状况事件的进度。

   1.  如果您使用 AWS Organizations，请启用 [organization view for AWS Health](https://docs.aws.amazon.com/health/latest/ug/aggregate-events.html) 以跨账户聚合 AWS Health 事件。

1.  **将 Amazon CloudWatch 警报与 Incident Manager 集成：**配置 CloudWatch 警报，以便在 [AWS Systems Manager Incident Manager](https://docs.aws.amazon.com/incident-manager/latest/userguide/response-plans.html) 中自动创建事件。

1.  **将 Amazon EventBridge 与 Incident Manager 集成：**创建[ EventBridge 规则](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html)，以便对事件做出反应，并使用定义的响应计划创建意外事件。

1.  **在 Incident Manager 中为意外事件做准备：**
   +  在 Incident Manager 中为每种类型的警报制定详细的[响应计划](https://docs.aws.amazon.com/incident-manager/latest/userguide/response-plans.html)。
   +  通过 [Amazon Q Developer in chat applications](https://docs.aws.amazon.com/incident-manager/latest/userguide/chat.html) 建立聊天频道，连接到 Incident Manager 中的响应计划，在发生事件时，协调 Slack、Microsoft Teams 和 Amazon Chime 等各个平台之间的实时沟通。
   +  将 [Systems Manager Automation 运行手册](https://docs.aws.amazon.com/incident-manager/latest/userguide/runbooks.html)纳入 Incident Manager 中，推动对意外事件的自动响应。

## 资源
<a name="resources"></a>

 **相关最佳实践：**
+  [OPS04-BP01 确定关键绩效指标](ops_observability_identify_kpis.md) 
+  [OPS08-BP04 创建可操作的警报](ops_workload_observability_create_alerts.md) 

 **相关文档：**
+ [AWS Cloud Adoption Framework: Operations Perspective - Incident and problem management ](https://docs.aws.amazon.com/whitepapers/latest/aws-caf-operations-perspective/incident-and-problem-management.html)
+ [使用 Amazon CloudWatch 告警](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)
+ [Setting up AWS Systems Manager Incident Manager](https://docs.aws.amazon.com/incident-manager/latest/userguide/setting-up.html)
+ [Preparing for incidents in Incident Manager](https://docs.aws.amazon.com/incident-manager/latest/userguide/incident-response.html)

 **相关视频：**
+ [Top incident response tips from AWS](https://www.youtube.com/watch?v=Cu20aOvnHwA)
+ [ re:Invent 2,023 \$1 Manage resource lifecycle events at scale with AWS Health](https://www.youtube.com/watch?v=VoLLNL5j9NA)

 **相关示例：**
+ [AWS 讲习会 – AWS Systems Manager Incident Manager – Automate incident response to security events](https://catalog.workshops.aws/automate-incident-response/en-US/settingupim/onboarding)