Ingest CloudWatch Metrics
groundcover supports ingesting CloudWatch metrics directly into our platform, allowing you to visualize them using dashboards and create alerts.
How does it work
CloudWatch integration is done by deploying a service called integrations-agent which is responsible for pulling metrics from CloudWatch using periodic polling of these APIs:
The integration setup is done directly through the App by following these steps:
Navigate to Settings > Integrations > Data Sources or following this link. Note that only users with Admin permissions can navigate to this page.
Select Amazon Web Services and follow the 3 steps in the wizard. Note that in step 1 you'll need to provide an ARN, granting groundcover with permissions to poll metrics. To do that, please follow the guidelines in this section.
Things to know
Ingestion interval
The integration pulls data from CloudWatch according to this interval. The lower the interval, the higher the polling rate and as a result, the overall costs will be higher.
Data storage
Data fetched is stored in the Victoria Metrics database, meaning metrics are queried via the CloudWatch API only one time per data point.
Metric Statistics
Each metric has a label called stat which denotes the AWS statistic used during querying. Some metrics have multiple stats which are useful for different cases.
Supported AWS services
Resource Discovery Methods
groundcover seamlessly integrates both methods below to avoid duplicate metric fetching.
The integration uses two methods to discover the AWS resources to fetch metrics for:
Tagging-based discovery - this method uses the AWS tagging mechanism to discover resources across all metric namespaces. This method supports all AWS namespaces but only works for resources which are tagged with at least one AWS tag.
List-based discovery - this method uses standard AWS APIs to list the resources in each namespace. It works for all resources regardless of tags, but the coverage is limited to specific namespaces as listed below:
AWS/RDS
AWS/S3
AWS/SQS
AWS/Lambda
AWS/ElastiCache
AWS/DynamoDB
AWS/ELB
AWS/NetworkELB
AWS/ApplicationELB
Create an IAM role and policy
Go to Amazon IAM
Click on Roles in the side bar
Click on Create Role
Select Custom trust policy
Paste the following policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::<YOUR_GROUNDCOVER_ACCOUNT_ID>:role/groundcover-integrations-agent-<GROUNDCOVER_SITE_ID>-sa" }, "Action": "sts:AssumeRole" } ] }Click on Next twice (we'll attach permissions later)
Provide a name for the role
Click on Create Role
Go to your newly created role
In the Permissions section, click on Add permissions and then Create inline policy
Click on JSON and paste the following:
{ "Version": "2012-10-17", "Id": "groundcover-integrations-agent", "Statement": [ { "Action": [ "tag:GetResources", "storagegateway:ListTagsForResource", "storagegateway:ListGateways", "shield:ListProtections", "iam:ListAccountAliases", "ec2:DescribeTransitGatewayAttachments", "ec2:DescribeSpotFleetRequests", "dms:DescribeReplicationTasks", "dms:DescribeReplicationInstances", "cloudwatch:ListMetrics", "cloudwatch:GetMetricStatistics", "cloudwatch:GetMetricData", "autoscaling:DescribeAutoScalingGroups", "aps:ListWorkspaces", "apigateway:GET", "s3:ListAllMyBuckets", "s3:GetBucketLocation", "s3:GetBucketTagging", "sqs:ListQueues", "sqs:GetQueueAttributes", "rds:DescribeDBInstances", "rds:DescribeDBClusters", "lambda:ListFunctions", "elasticache:DescribeCacheClusters", "elasticache:DescribeServerlessCaches", "dynamodb:ListTables", "dynamodb:ListTagsOfResource", "dynamodb:DescribeTable" ], "Effect": "Allow", "Resource": "*" } ] }Click on Next
Give the policy a name
Click on Create Policy
Last updated
