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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠