Stream AWS CloudWatch metrics through the AWS Console
This guide walks through setting up CloudWatch metrics streaming to AppSignal by creating each resource manually in the AWS Console. For an automated alternative, see Stream AWS CloudWatch metrics with CloudFormation.
For an overview of CloudWatch metrics in AppSignal, including magic dashboards and metric naming, see AWS CloudWatch metrics.
Complete the following steps to send CloudWatch metrics to AppSignal through Amazon Data Firehose:
- Set up an S3 bucket for failed deliveries
- Set up an IAM role for Data Firehose
- Create a Firehose stream
- Create a CloudWatch metric stream
Before you start, have the following information ready:
- Your app's App-level Push API key. To find it, open the API keys settings page, or navigate to your organization settings and select Dev zone > API keys.
- AWS region
Set up an S3 bucket for failed deliveries
Amazon Data Firehose requires an S3 bucket to store records that fail to deliver. Create an S3 bucket through the AWS Console or CLI before proceeding.
Set up an IAM role for Data Firehose
Create an IAM role that allows Data Firehose to write to the S3 bucket. Use the following trust policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "firehose.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
Assign the following permissions policy to the role as an inline policy.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:AbortMultipartUpload", "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::<FIREHOSE_S3_BUCKET>", "arn:aws:s3:::<FIREHOSE_S3_BUCKET>/*" ] } ] }
Replace <FIREHOSE_S3_BUCKET> with the name of the S3 bucket you created in the previous step.
Create a Firehose stream
- Open the Amazon Data Firehose console and select Create Firehose stream.
- Select Direct PUT as the source.
- Select HTTP Endpoint as the destination.
- Under "Transform records", leave data transformation turned off.
- Enter the following URL as the HTTP endpoint URL:
https://appsignal-endpoint.net/metrics/aws-cloudwatch
- Enter your app's App-level Push API key as the Access key.
- Under "Content encoding", enable GZIP.
- Under "Backup settings", select the S3 bucket you created in the previous steps.
- Under "Advanced settings > Service access", select Choose existing IAM role and choose the IAM role you created in the previous steps.
- Select Create Firehose stream.
After creating the stream, use the Test with demo data feature on the Firehose stream page to verify the connection. If everything is configured correctly, test data appears in AppSignal.
Create a CloudWatch metric stream
- In the CloudWatch console, go to Metrics > Streams.
- Select Create metric stream.
- Select Custom setup with Firehose. Under Select your Amazon Data Firehose stream, choose the Firehose stream you created in the previous step.
- Select OpenTelemetry 1.0 as the output format.
- Select Create metric stream.
You can create multiple metric streams if you need to send metrics to different destinations or filter metrics differently for separate use cases.
CloudWatch metrics in AppSignal
After setup, AppSignal receives metrics from any AWS service that emits metrics through CloudWatch.
AppSignal automatically creates magic dashboards for supported AWS services when it detects their metrics. These dashboards appear in Dashboards with pre-built charts for the most important metrics of each service.
You can also build your own views using custom dashboards. In the Metric field, type aws_ to browse the CloudWatch metrics AppSignal has received. AppSignal normalizes CloudWatch metric names to lowercase with underscores. For example, AWS/Firehose DeliveryToS3.Success becomes aws_firehose_delivery_to_s3_success.
It can take a few minutes after setup for the first metrics to appear. If the list is empty, wait a few minutes and refresh.
If you need help, contact us.