在主控台中,您可以在建立或修改資料庫執行個體時或多可用區域資料庫叢集時啟用或關閉 Performance Insights。
在建立資料庫執行個體或多可用區域資料庫叢集時,開啟或關閉績效詳情
建立新的資料庫執行個體或多可用區域資料庫叢集之後,Amazon RDS 預設會啟用績效詳情。若要關閉,請選擇 Database Insights – Standard 選項,然後取消選取啟用績效詳情選項。
如需詳細資訊,請參閱下列主題。
下列螢幕擷取畫面顯示 Performance Insights (績效詳情) 區段。
若您選擇 Enable Performance Insights (啟用績效詳情),會有下列選項:
在修改資料庫執行個體或多可用區域資料庫叢集時,開啟或關閉績效詳情
在 主控台中,您可以修改的資料庫叢集,以管理績效詳情。
使用主控台管理資料庫執行個體或多可用區域資料庫叢集 Performance Insights
登入 AWS Management Console 並開啟位於 https://https://console.aws.amazon.com/rds/ 的 Amazon RDS 主控台。
-
選擇 Databases (資料庫)。
-
選擇資料庫執行個體或多可用區域資料庫叢集,然後選擇修改。
-
若要開啟績效詳情,請選取啟用績效詳情。若要關閉,請選擇 Database Insights – Standard 選項,然後取消選取啟用績效詳情選項。
若您選擇 Enable Performance Insights (啟用績效詳情),會有下列選項:
-
保留 (僅適用於 Database Insights 的標準模式) – 保留績效詳情資料的時間長度。免費方案中的保留設定為 Default (7 days) (預設值 (7 天))。若要更長時間保留績效資料,請指定 1 - 24 個月。如需保留期間的詳細資訊,請參閱 Performance Insights 的定價和資料保留。
-
AWS KMS key – 指定您的 KMS 金鑰。績效詳情使用您的 KMS 金鑰來加密所有可能的敏感資料。將會對傳輸中與靜態資料進行加密。如需詳細資訊,請參閱加密 Amazon RDS 資源。
-
選擇 Continue (繼續)。
-
在 Scheduling of Modifications (修改排程) 中,選擇 Apply immediately (立即套用)。如果您選擇 Apply during the next scheduled maintenance window (在下一個排定的維護時段套用),則執行個體會忽略此設定,並立即開啟 Performance Insights。
-
選擇 Modify instance (修改執行個體)。
當您使用 create-db-instance AWS CLI 命令時,請指定 --enable-performance-insights
並--database-insights-mode
設定為 advanced
或 以開啟績效詳情standard
。若要關閉績效詳情,請指定 --no-enable-performance-insights
並database-insights-mode
設為 standard
。
您也可以使用下列 AWS CLI 命令來指定這些值:
當您開啟績效詳情時,可選擇使用 --performance-insights-retention-period
選項指定保留績效詳情資料的天數。您可指定為 7
、月
* 31 (其中月
是指 1 - 23) 的數字,或 731
。例如,如果您想要保留效能資料 3 個月,請指定 93
,也就是 3 個 * 31。預設值是 7
天。如需保留期間的詳細資訊,請參閱 Performance Insights 的定價和資料保留。
下列範例會開啟 sample-db-cluster
的 Performance Insights,並指定 Performance Insights 資料保留 93 天 (3 個月)。
對於 Linux、 macOS或 Unix:
aws rds modify-db-cluster \
--database-insights-mode standard \
--db-cluster-identifier sample-db-instance \
--enable-performance-insights \
--performance-insights-retention-period 93
在 Windows 中:
aws rds modify-db-cluster ^
--database-insights-mode standard ^
--db-cluster-identifier sample-db-instance ^
--enable-performance-insights ^
--performance-insights-retention-period 93
如果您指定保留期間 (例如 94 天),這不是有效值,RDS 就會發出錯誤。
An error occurred (InvalidParameterValue) when calling the CreateDBInstance operation:
Invalid Performance Insights retention period. Valid values are: [7, 31, 62, 93, 124, 155, 186, 217,
248, 279, 310, 341, 372, 403, 434, 465, 496, 527, 558, 589, 620, 651, 682, 713, 731]
您只能在不在叢集層級管理績效詳情的資料庫叢集中切換執行個體的績效詳情。