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
feita há 4 anos762 visualizações
1 Resposta
1
Resposta aceita

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 há 4 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas