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
preguntada hace 4 años762 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas