啟用和停用績效詳情 - Amazon DocumentDB

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

啟用和停用績效詳情

若要使用績效詳情,請在資料庫執行個體上啟用。如有必要,您可以稍後禁用它。啟用和停用績效詳情不會造成停機、重新開機或容錯移轉。

績效詳情代理程式會耗用資料庫主機上有限的 CPU 和記憶體。當資料庫負載過高時,代理程式會減少收集資料的頻率來限制效能影響。

建立叢集時啟用 Performance Insights

在主控台中,您可以在建立或修改新的資料庫執行個體時啟用或停用績效詳情。

使用 AWS Management Console

在主控台中,您可以在建立 DocumentDB 叢集時啟用 Performance Insights。當您建立新的 DocumentDB 叢集時,請選擇 [Performance Insights] 區段中的 [啟用 Performance Insights],以啟用 Perfor mance Insights

控制台說明
  1. 若要建立叢集,請依照建立 Amazon DocumentDB 叢集中的指示進行。

  2. 選取 [效能洞見] 區段中的 [啟用 Performance Insights]。

    注意

    Performance Insights 資料保留期為七天。

    AWS KMS金 — 指定您的 AWS KMS 金鑰。績效詳情使用您的 AWS KMS 金鑰來對所有可能具敏感性的資料進行加密。將會對傳輸中與靜態資料進行加密。如需詳細資訊,請參閱設定 Performance Insights 的AWSAWS KMS原則。

修改執行個體時啟用和停用

您可以使用主控台或修改資料庫執行個體以啟用或停用 Performance Insights AWS CLI。

Using the AWS Management Console
控制台說明
  1. 登入AWS Management Console,然後在 https://console.aws.amazon.com/docdb 開啟 Amazon DocumentDB 主控台。

  2. 選擇 Clusters (叢集)

  3. 選擇資料庫執行個體,然後選擇 修改 (Modify)

  4. 在 [Performance Insights] 區段中,選擇 [啟用 Performance Insights] 或 [停用 Performance Insights]。

    注意

    如果您選擇啟用 Performance Insights,您可以指定AWSAWS KMS金鑰。績效詳情使用您的 AWS KMS 金鑰來對所有可能具敏感性的資料進行加密。將會對傳輸中與靜態資料進行加密。如需詳細資訊,請參閱加密靜態 Amazon 文件資料庫資料

  5. 選擇 Continue (繼續)。

  6. Scheduling of Modifications (修改排程) 中,選擇 Apply immediately (立即套用)。如果您在下一個排定的維護時段期間選擇「套用」,則執行個體會忽略此設定,並立即啟用 Performance Insights。

  7. 選擇 Modify instance (修改執行個體)

Using the AWS CLI

當您使用create-db-instance或命modify-db-instanceAWSAWS CLI令時,您可以指定或透過指定--enable-performance-insights來停用 Performance Insights 來啟用效能洞見--no-enable-performance-insights

下列程序說明如何使用啟用或停用資料庫執行個體的 Performance Insights AWS AWS CLI。

AWSAWS CLI指示

呼叫命modify-db-instanceAWSAWS CLI令並提供下列值:

  • --db-instance-identifer— 資料庫執行個體的名稱

  • --enable-performance-insights 以啟用或 --no-enable-performance-insights 以停用

下列範例會啟用下列項目的 Performance Insightssample-db-instance

For Linux, macOS, or Unix:For Windows:
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