Amazon CloudWatch Metric Streams
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 Kinesis Firehose to the Dynatrace API.
AWS default integration vs AWS Metric Streaming
Differences between AWS default integration and AWS Metric Streaming.
AWS Default integration | AWS Metric Streaming | |
---|---|---|
ActiveGate | Required for non-built-in services or monitored environments bigger than 2000 instances️ | Not required️ |
Kinesis Firehose | Not required️ | Required️ |
Public endpoint | Not required️ | Required |
Available metrics | Selected Amazon CloudWatch metrics️ | All available Amazon CloudWatch metrics️ |
Metrics selection | In Dynatrace️ | In Amazon CloudWatch console️ |
Metrics selection scope | Monitored metrics selection possible at the level of a single metric and its statistics️ | Monitored metrics selection possible only at the level of the whole namespace️ |
Metrics key prefix | ext:cloud.aws.<service> ️ | cloud.aws.<service> ️ |
Dynatrace Entities (topology attributes and tags) | ️ | |
Predefined alerts | ||
Predefined dashboards |
Prerequisites
- Create an API token in your Dynatrace environment and enable the Ingest metrics permission.
- Determine the API URL for your environment:
- For Dynatrace SaaS
https://<your_environment_ID>.live.dynatrace.com
- For Dynatrace Managed
https://<your_domain>/e/<your_environment_ID>
- For ActiveGate
https://<your_active_gate_IP_or_hostname>:9999/e/<your_environment_ID>
- For Dynatrace SaaS
To determine <your_environment_ID>
, see environment ID.
You need to have your Dynatrace tenant open to incoming Internet traffic (or at least to AWS traffic) to be able to receive the AWS metrics. Restrictive firewalls might block the streaming service.
Set up a Metric Streams client
You can set up a Metric Streams client with a CloudFormation template or in the AWS console. See below for instructions.
View metrics using preset dashboards
Once you deploy the Metric Streams client, you can use the predefined dashboards from the GitHub repository in the Dynatrace web UI to visualize your ingested data.
To upload preset dashboards from GitHub
- Get
upload_dashboards.py
from the GitHub repository.
1curl -o upload_dashboards.py https://raw.githubusercontent.com/Dynatrace/snippets/master/product/dashboarding/upload_dashboards.py
-
Create a
dashboards
directory next toupload_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.
Parameter | Description |
---|---|
cluster-version | The minor version of your Dynatrace Cluster. For instance, for version 1.210.1.xxxxx , you need to provide 210 . |
dynatrace-api-token | Your API token. See Prerequisites for instructions. |
dynatrace-env-url | Your API URL. See Prerequisites for instructions. |
1python3 upload_dashboards.py --cluster-version <your_dynatrace_cluster_version> --dynatrace-api-token <your_API_token> --dynatrace-env-url <your_API_URL>
Example command
1python3 upload_dashboards.py --cluster-version 206 --dynatrace-api-token 123456789 --dynatrace-env-url https://my-cluster.com/e/1755ddb2-7938-41a2-b6bd-096e0fdcd3e0
Uninstall the Metric Streams client
If you deployed the Metric Streams client with a CloudFormation template
- In the AWS console, go to CloudFormation.
Select the stack you created in the CloudFormation deployment.
- In Resources, find the resource with type
AWS::S3::Bucket
, select its link, and, in the S3 console, delete all objects in this bucket. - Back in CloudFormation, in Stack information, select Delete.
If you deployed the Metric Streams client through the AWS console, delete all the resources you created (S3 bucket, Kinesis Firehose delivery stream, CloudWatch metric stream).
Metric Streams limitations
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