启用和禁用 Performance Insights - Amazon DocumentDB
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

启用和禁用 Performance Insights

要使用 Performance Insights,请在数据库实例中启用它。如果需要,您可以稍后将其禁用。启用和禁用 Performance Insights 不会导致停机、重新启动或故障转移。

Performance Insights 代理占用数据库主机上有限的 CPU 和内存。当数据库负载较高时,代理将通过降低收集数据的频率来限制性能影响。

在创建集群时启用性能详情

在控制台中,您可以在创建或修改新数据库实例时启用或禁用 Performance Insights。

在控制台中,可以在创建 DocumentDB 集群时启用 Performance Insights。在创建新 DocumentDB 集群时,通过以下方式启用 Performance Insights 情:Enable Performance Insights (启用 Performance Insights)中的Performance Insights部分。

控制台说明
  1. 要创建集群,请按照以下说明操作创建 Amazon DocumentDB 集群。

  2. SelectEnable Performance Insights (启用 Performance Insights)在 Performance Insights 部分。

    注意

    Performance Insights 数据保留期将为 7 天。

    Amazon KMS密钥— 指定您的AmazonKMS 密钥。Performance Insights 使用您的 Amazon KMS 密钥来加密所有潜在的敏感数据。正在传输的数据和静态数据都会被加密。有关更多信息,请参阅配置Amazon Amazon KMSPerformance Insights 的策略。

在修改实例时启用和禁用

您可以修改数据库实例以使用控制台或禁用 Performance Insights。Amazon CLI.

控制台说明
  1. 登录到Amazon Web Services Management Console,然后在以下位置打开 Amazon DocumentDB 控制台https://console.aws.amazon.com/docdb.

  2. 选择 Clusters (集群)

  3. 选择一个数据库实例,然后选择修改

  4. 在 Performance Insights 部分中选择Enable Performance Insights (启用 Performance Insights)要么禁用 Performance Insights.

    注意

    如果选择Enable Performance Insights (启用 Performance Insights),您可以指定您的Amazon Amazon KMS键。Performance Insights 使用您的 Amazon KMS 密钥来加密所有潜在的敏感数据。正在传输的数据和静态数据都会被加密。有关更多信息,请参阅 。加密 Amazon DocumentDB 静态数据.

  5. 选择 Continue (继续)

  6. 对于修改计划,选择立即应用。如果选择Apply during the next scheduled maintenance window (在下一个计划的维护时段内应用),您的实例将忽略此设置并立即启用性能详情。

  7. 选择 Modify instance (修改实例)

当您使用create-db-instance要么modify-db-instance Amazon Amazon CLI可以通过以下方式启用 Performance Insights 详情:--enable-performance-insights,或者通过指定将其禁用--no-enable-performance-insights.

以下过程介绍如何使用为数据库实例启用或禁用 Performance Insights。Amazon Amazon CLI.

Amazon Amazon CLI说明

调用modify-db-instance Amazon Amazon CLI命令并提供以下值:

  • --db-instance-identifer— 数据库实例的名称

  • --enable-performance-insights 以启用,或 --no-enable-performance-insights 以禁用

以下示例为启用 Performance Insights:sample-db-instance

For Linux, macOS, or Unix:
aws docdb modify-db-instance \ --db-instance-identifier sample-db-instance \ --enable-performance-insights
For Windows:
aws docdb modify-db-instance ^ --db-instance-identifier sample-db-instance ^ --enable-performance-insights