CloudWatch Dashboard

0

Hi All

Is there a way to merge 2 separate CloudWatch Dashboards into one programmatically?

I have one dashboard that gets created through a CloudFormation stack and another through a different stack. There really is not an option to insert both in the same stack so I was wondering if there is any option that I can export the 2 dashboards (which I have been able to do ) and merge into a single JSON (struggling here - how to do that? Any simple API that allows us to do it) and create a new one.

Thanks

AWS
anshsax
質問済み 4年前762ビュー
1回答
1
承認された回答

Yes, there is. It's however not a single command.

If we look at the available CLI commands, you'll need:

  • get-dashboard: you retrieve the dashboard in JSON format. You are interested in the "widgets" array. You apply this API to dashboard1 and dashboard2
  • Now use your preferred method to extract the widgets element from the DashboardBody of dashboard1
  • Use your preferred method to inject these widgets into the DashboardBody of dashboard2 (under the widgets element of course)
  • put-dashboard: to create a new dashboard or update an existing one if you give it a name of an existing dashboard

Please see:

AWS
回答済み 4年前

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

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

質問に答えるためのガイドライン

関連するコンテンツ