

# Amazon CloudWatch Application Insights 的工作方式
<a name="appinsights-how-works"></a>

CloudWatch Application Insights 提供对应用程序资源的监控。以下信息描述了 Application Insights 的工作原理。

**Topics**
+ [Application Insights 监控应用程序的方式](#appinsights-how-works-sub)
+ [数据留存](#appinsights-retention)
+ [配额](#appinsights-limits)
+ [CloudWatch Application Insights 使用的 Amazon Systems Manager (SSM) 软件包](appinsights-ssm-packages.md)
+ [CloudWatch Application Insights 使用的 Amazon Systems Manager（SSM）文档](appinsights-ssm-documents.md)

## Application Insights 监控应用程序的方式
<a name="appinsights-how-works-sub"></a>

以下信息描述了 Application Insights 如何监控应用程序。

**应用程序发现和配置**  
首次将应用程序添加到 CloudWatch Application Insights 时，它扫描应用程序组件以建议关键指标、日志和其他数据源，以便监控您的应用程序。然后，您可以根据这些建议配置应用程序。

**数据预处理**  
CloudWatch Application Insights 持续分析在应用程序资源中监控的数据源，以查找指标异常情况和日志错误（观察结果）。

**智能问题检测**  
CloudWatch Application Insights 引擎使用分类算法和内置规则关联观察结果，以检测应用程序中的问题。为了帮助进行故障排除，它创建一些自动化 CloudWatch 控制面板，其中包含有关问题的上下文信息。

**警报和操作**  
在 CloudWatch Application Insights 检测到应用程序出现问题时，它生成 CloudWatch Events 以通知您该问题。有关如何设置这些事件的更多信息，请参阅[检测到的问题的 Application Insights CloudWatch Events](appinsights-cloudwatch-events.md)。此外，您可以[配置 Amazon SNS 通知](appinsights-problem-notifications.md)，进而在检测到问题时接收提醒。

**示例方案**

您具有一个由 SQL Server 数据库支持的 ASP .NET 应用程序。突然，您的数据库由于内存压力过高而开始发生故障。这会导致应用程序性能下降，并且可能会导致在 Web 服务器和负载均衡器中出现 HTTP 500 错误。

借助于 CloudWatch Application Insights 及其智能分析，您可以检查动态创建的控制面板（显示相关指标和日志文件片段）以找出导致问题的应用程序层。在这种情况下，问题可能出在 SQL 数据库层。

## 数据留存
<a name="appinsights-retention"></a>

CloudWatch Application Insights 将问题保留 55 天，并将观察结果保留 60 天。

## 配额
<a name="appinsights-limits"></a>

有关 CloudWatch Application Insights 的默认配额，请参阅 [Amazon CloudWatch Application Insights 端点和配额](https://docs.amazonaws.cn/general/latest/gr/applicationinsights.html)。除非另有说明，否则，每个配额针对的是每个 Amazon 区域。如需请求增加服务配额，请联系 [Amazon Support](https://console.amazonaws.cn/support/home#/case/create?issueType=technical)。许多服务包含无法更改的配额。有关特定服务的配额的更多信息，请参阅针对该服务的文档。