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
gefragt vor 4 Jahren762 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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
beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen