開始使用 CloudWatch Database Insights - Amazon CloudWatch

開始使用 CloudWatch Database Insights

Amazon RDS 和 Aurora 資料庫預設啟用 Database Insights 的標準模式。若要開始使用 Database Insights 的進階模式,可以建立新的資料庫或修改資料庫。

如需為 Amazon RDS 資料庫啟用 Database Insights 的進階模式或標準模式的詳細資訊,請參閱下列主題。

如需為 Amazon Aurora 資料庫啟用 Database Insights 的進階模式或標準模式的相關資訊,請參閱下列主題。

如需為 Aurora PostgreSQL Limitless Database 啟用 Database Insights 進階模式或標準模式的相關資訊,請參閱下列主題。

Database Insights 的必要許可

使用 Database Insights 需要特定 IAM 許可。Database Insights 需要 CloudWatch、CloudWatch Logs、Amazon RDS 和 Amazon RDS Performance Insights 的許可。若您擁有更廣泛的權限,可能無需為使用者或角色提供這些許可。

需要下列 CloudWatch 許可才能使用 Database Insights。

  • cloudwatch:BatchGetServiceLevelIndicatorReport

  • cloudwatch:DescribeAlarms

  • cloudwatch:GetDashboard

  • cloudwatch:GetMetricData

  • cloudwatch:ListMetrics

  • cloudwatch:PutDashboard

需要下列 CloudWatch Logs 許可才能使用 Database Insights。

  • logs:DescribeLogGroups

  • logs:GetQueryResults

  • logs:StartQuery

  • logs:StopQuery

需要下列 Amazon RDS 許可才能使用 Database Insights。

  • rds:DescribeDBClusters

  • rds:DescribeDBInstances

  • rds:DescribeEvents

  • rds:DescribeDBShardGroups (如果您要監控 Aurora PostgreSQL Limitless Database)

需要下列 Performance Insights 許可才能使用 Database Insights。

  • pi:ListAvailableResourceMetrics

  • pi:ListAvailableResourceDimensions

  • pi:DescribeDimensionKeys

  • pi:GetDimensionKeyDetails

  • pi:GetResourceMetrics

  • pi:ListPerformanceAnalysisReports

  • pi:GetResourceMetadata

  • pi:GetPerformanceAnalysisReport

  • pi:CreatePerformanceAnalysisReport

  • pi:DeletePerformanceAnalysisReport

  • pi:ListTagsForResource

  • pi:TagResource

  • pi:UntagResource

下列政策範例中包含完整存取 Database Insights 所需的許可。

JSON
{ "Version":"2012-10-17", "Statement": [{ "Effect" : "Allow", "Action" : [ "cloudwatch:BatchGetServiceLevelIndicatorReport", "cloudwatch:DescribeAlarms", "cloudwatch:GetMetricStatistics", "cloudwatch:GetMetricData", "cloudwatch:ListMetrics", "cloudwatch:PutDashboard" ], "Resource" : "*" }, { "Effect" : "Allow", "Action" : [ "logs:DescribeLogGroups", "logs:GetQueryResults", "logs:StartQuery", "logs:StopQuery" ], "Resource" : "*" }, { "Effect" : "Allow", "Action" : [ "pi:DescribeDimensionKeys", "pi:GetDimensionKeyDetails", "pi:GetResourceMetadata", "pi:GetResourceMetrics", "pi:ListAvailableResourceDimensions", "pi:ListAvailableResourceMetrics", "pi:CreatePerformanceAnalysisReport", "pi:GetPerformanceAnalysisReport", "pi:ListPerformanceAnalysisReports", "pi:DeletePerformanceAnalysisReport", "pi:TagResource", "pi:UntagResource", "pi:ListTagsForResource" ], "Resource" : "arn:aws:pi:*:*:*/rds/*" }, { "Effect" : "Allow", "Action" : [ "rds:DescribeDBInstances", "rds:DescribeDBClusters", "rds:DescribeEvents" ], "Resource" : "*" } ] }