Skip to content

CloudWatch dashboard source JSON

0

I'm trying to setup custom dashboards in terraform and need the JSON from a dashboard I created in AWS Management Console. Will someone please explain how to get access to the source JSON for an existing custom dashboard? If not, will someone explain the x/y coordinate system? Is it in pixels or some other unit?

asked 4 years ago4.4K views

3 Answers
2
Accepted Answer

To access the source JSON for an existing custom dashboard in the AWS Management Console:

  1. Sign in to the AWS Management Console and navigate to the CloudWatch service.
  2. In the navigation pane, click on "Dashboards" on the left pane.
  3. Find the dashboard you want to edit and click on its name to open it.
  4. Click the "Actions" dropdown menu in the top right corner of the dashboard and select "View/edit source".
  5. This will open a new tab with the source JSON for the dashboard. You can then copy and paste this JSON into a Terraform configuration file to create a custom dashboard resource.

As for the x/y coordinate system used in the dashboard JSON, the units are pixels. The x-coordinate represents the distance from the left edge of the dashboard, and the y-coordinate represents the distance from the top edge of the dashboard.

AWS

answered 4 years ago

1

There is an API for CloudWatch. A GetDashboard API call can get the info for you in a JSON format. https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetDashboard.html

AWS

answered 4 years ago

0

Thank you ananthtm and tedtrent. Your answers solved my quandary.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.