Integrate CloudWatch Grafana Datasource
To set up the CloudWatch datasource in Grafana, you need to configure the necessary credentials and permissions. This involves creating an IAM role in AWS with appropriate permissions to access CloudWatch metrics and data.
To set up an IAM role with cross-account assume for accessing CloudWatch data in Grafana, you need to follow these steps:
Create an IAM Role in the target account: In the target account, navigate to the IAM service and create a new IAM role.
Define the trust relationship: When creating the IAM role, define the trust relationship policy document to include the groundcover account as the trusted entity, along with the external ID.
Here's an example trust policy document. NOTE: Choose
YOUR_EXTERNAL_ID
as a unique and secret external ID. This will be used by the integration to identify your account.Attach an inline policy: While creating the IAM role add an inline policy with the necessary permissions for accessing CloudWatch metrics, logs, and EC2 resources. Here's an example of policy document:
Depending on your plan, follow these steps:
For enterprise plan - Add a new DataSource in your Grafana. NOTE: This requires a user with admin privileges in the platform.
Access the
Add New Datasource
page in the GrafanaChoose the
CloudWatch
data sourceChoose a
Name
for your data source.Fill in the
Assume Role ARN
andExternal ID
fields with the IAM role and external ID selected earlier.Choose a
Default Region
based on your account's region.Click
Save & Test
to create the data source.
For other plans - Share the IAM role ARN, along with the external ID, with the relevant groundcover contact. This ARN will be used during the configuration of the CloudWatch datasource in Grafana.
Last updated