Dynatrace integration with Amazon CloudWatch Metric Streams provides a simple and safe way to ingest AWS metrics. Amazon CloudWatch Metric Streams allows all metrics issued in a given AWS region to be streamed through Firehose to the Dynatrace API.
Differences between AWS default integration and AWS Metric Streams.
ext:cloud.aws.<service>
️cloud.aws.<service>
️https://<your_environment_ID>.live.dynatrace.com
https://<your_domain>/e/<your_environment_ID>
https://<your_active_gate_IP_or_hostname>:9999/e/<your_environment_ID>
To determine <your_environment_ID>
, see environment ID.
To receive the AWS metrics, the previously selected endpoint needs to be open to incoming Internet traffic. Restrictive firewalls might block the streaming service.
You can set up a Metric Streams client with a CloudFormation template or in the AWS console. See below for instructions.
CloudFormation allows you to deploy a Metric Streams client using a single deployment command to create a stack that groups multiple AWS resources. This approach is faster and makes AWS resource management easier.
You need one client stack for each region you want to monitor. Once deployed, the client starts streaming all metrics produced in its region. You can restrict which metrics are streamed.
To fetch the CloudFormation template and deploy it to your AWS account, run the command below. Be sure to replace <your_API_URL>
and <your_API_token>
with your own values. Consult the parameters table that follows for details.
If you have AWS CLI configured, you can use a Bash-compliant shell. Otherwise, you can use CloudShell, which is available in the AWS console.
STACK_NAME
dynatrace-aws-metric-streams-client
REQUIRE_VALID_CERTIFICATE
true
, Dynatrace verifies the SSL certificate of your Dynatrace environment URL.true
DELIVERY_ENDPOINT
https://aws.cloud.dynatrace.com/
https://us.aws.cloud.dynatrace.com/
https://eu.aws.cloud.dynatrace.com/
https://aws.cloud.dynatrace.com/
DYNATRACE_ENV_URL=<your_API_URL>DYNATRACE_API_KEY=<your_API_token>STACK_NAME=dynatrace-aws-metric-streams-clientDELIVERY_ENDPOINT=https://aws.cloud.dynatrace.com/REQUIRE_VALID_CERTIFICATE=truewget -O dynatrace-aws-metric-streams-client.yaml https://assets.cloud.dynatrace.com/awsmetricstreaming/dynatrace-aws-metric-streams-client.yaml && \aws cloudformation deploy --capabilities CAPABILITY_NAMED_IAM --template-file ./dynatrace-aws-metric-streams-client.yaml --stack-name $STACK_NAME --parameter-overrides DynatraceEnvironmentUrl=$DYNATRACE_ENV_URL DynatraceApiKey=$DYNATRACE_API_KEY RequireValidCertificate=$REQUIRE_VALID_CERTIFICATE FirehoseHttpDeliveryEndpoint=$DELIVERY_ENDPOINT
The command above uses the default AWS CLI profile and its default region. To change the profile and region, you can export additional variables such as AWS_DEFAULT_REGION
and AWS_PROFILE
and rerun the deployment command. If you are using CloudShell, you can change the region in the AWS console instead. For details on how to configure the AWS CLI, see Environment variables to configure the AWS CLI.
To monitor metrics from linked AWS accounts using one AWS Metric Streams integration, you need to set IncludeLinkedAccountsMetrics
parameter to true
in the CloudFormation template.
To ensure that the Metric Streams client was deployed correctly
If you want to restrict which metrics are streamed
AWS::CloudWatch::MetricStream
and note its Physical ID.Once you deploy the Metric Streams client, you can use the predefined dashboards from the GitHub repository in Dynatrace to visualize your ingested data.
To upload preset dashboards from GitHub
upload_dashboards.py
from the GitHub repository.curl -o upload_dashboards.py https://raw.githubusercontent.com/Dynatrace/snippets/master/product/dashboarding/upload_dashboards.py
Create a dashboards
directory next to upload_dashboards.py
.
Add any dashboard definition from GitHub to your dashboards
directory.
Each dashboard definition is a single JSON file located in the folders of the GitHub repository.
Run the script below. Be sure to replace <your_dynatrace_cluster_version>
, <your_API_token>
, and <your_API_URL>
with your own values. Consult the parameters table that follows for details.
cluster-version
1.210.1.xxxxx
, you need to provide 210
.dynatrace-api-token
dynatrace-env-url
python3 upload_dashboards.py --cluster-version <your_dynatrace_cluster_version> --dynatrace-api-token <your_API_token> --dynatrace-env-url <your_API_URL>
Example command
python3 upload_dashboards.py --cluster-version 206 --dynatrace-api-token 123456789 --dynatrace-env-url https://my-cluster.com/e/1755ddb2-7938-41a2-b6bd-096e0fdcd3e0
If you deployed the Metric Streams client with a CloudFormation template
AWS::S3::Bucket
, select its link, and, in the S3 console, delete all objects in this bucket.If you deployed the Metric Streams client through the AWS console, delete all the resources you created (S3 bucket, Firehose delivery stream, CloudWatch metric stream).
A metric won't be streamed if it is more than two hours old. You can determine a metric's age by graphing it in the CloudWatch console and checking the age of the last datapoint displayed.
For more limitations, see Amazon CloudWatch troubleshooting page