スキップしてコンテンツを表示

Performance InsightsからDatabase Insightsへの移行後もAWS CLIでDB負荷情報を取得する方法について

0

Performance Insightsの終了予定が発表されたことに伴い、Database Insightsのアドバンスモードへの移行を検討しております。 その中で、PowerShellでAWS CLIを実行し、Databese Insights経由でDB負荷情報(メトリクス情報)を取得したいと考えております。

下記3点についてご教示いただけますでしょうか。 ①コマンド例と各項目で指定する値の詳細 ②複数のメトリクスをjsonファイルで設定する方法と、jsonファイルの書き方 ③出力結果のファイル名およびファイル形式は「$outputfile」で指定可能か

元々はPerformance Insightsを下記の例のような形で取得していたため、できるだけ近い形で取得可能か含め確認したいです。

$nowdate = $((Get-Date).ToString('yyyyMMdd_HH0000'))
$startTime = (Get-Date).AddHours(-1).ToString('yyyy-MM-ddTHH:00:00Z')
$endTime = (Get-Date).ToString('yyyy-MM-ddTHH:00:00Z')
$outputFile = "C:\Users\A\Desktop\pi_query1"+$nowdate+".json"
$queryFile = "E:\conf\query1.json"
aws pi get-resource-metrics `
  --service-type RDS `
  --identifier db-******* `
  --start-time $startTime `
  --end-time $endTime `
  --period-in-seconds 60 `
  --metric-queries file://$queryFile `
  --region ap-northeast-1 `
  --output json > $outputFile

上記で参照している.jsonでは複数のメトリクスを指定しておりました。

質問済み 1年前988ビュー

1回答
0

2025/11/30 に Performance Insights のコンソール機能がサポートを終了いたしますが、Performance Insights の API 自体は継続してご利用いただくことが可能でございます。[1]

そのため、get-resource-metrics コマンドをそのままご利用いただければと存じます。

Sources

[1] Monitoring DB load with Performance Insights on Amazon RDS

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights.html

AWS has announced the end-of-life date for Performance Insights: November 30, 2025. After this date, Amazon RDS will no longer support the Performance Insights console experience, flexible retention periods (1-24 months), and their associated pricing.
... (中略) ...
For information about upgrading to the Advanced mode of Database Insights, see Turning on the Advanced mode of Database Insights for Amazon Aurora. Note that the Performance Insights API will continue to exist with no pricing changes. Performance Insights API costs will appear under CloudWatch alongside Database Insights charges in your AWS bill.

ご不明な点がございましたら、AWS 技術サポートまでお問い合わせいただきますようお願いいたします。

回答済み 1年前

AWS
サポートエンジニア

修正済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ