Monitor Amazon Web Services with CloudWatch metrics
Follow this guide to start ingesting data remotely from Amazon CloudWatch.
Its main focus is on infrastructure monitoring of AWS services: Dynatrace monitoring AWS services via CloudWatch.
See What's next? for Full-Stack and Log Monitoring of your AWS services.
After you have established the initial monitoring, you can add, remove, or modify service monitoring using the Dynatrace web UI, at scale, or using the Dynatrace API.
To learn the measurements collected for each of the AWS services, see:
The Amazon Web Services infrastructure monitoring provides metrics from CloudWatch, infrastructure data available via public AWS API, and specific events. The data is collected in five-minute intervals.
Cost of monitoring
-
Each service monitored by Dynatrace through CloudWatch, as well as log processing and analysis, consumes DDUs.
-
Amazon may charge you extra for CloudWatch metric queries. For details on these additional costs, please consult Amazon CloudWatch pricing online documentation.
Monitoring prerequisites
There are three prerequisites for the AWS monitoring setup:
Dynatrace admin permissions
ActiveGate capable of AWS monitoring
AWS monitoring policy and role-based authentication
Dynatrace admin permissions
To manage AWS monitoring configuration, you need permissions to read and modify the builtin:cloud.aws
schema.
- Both
settings:objects:read
andsettings:objects:write
are required. - They are included in the Change monitoring settings permissions.
- Read-only access is not supported.
See Manage user permissions with roles for details on how to manage and set permissions.
ActiveGate capable of AWS Monitoring
To monitor Amazon Web services, Dynatrace needs to be able to connect to the Amazon CloudWatch API and query it periodically. At least one ActiveGate needs to be able to connect to Amazon CloudWatch to perform the monitoring tasks. Your ActiveGate needs to be able to connect to the endpoints listed below.
From Dynatrace version 1.267+, only role-based access can be used. Key-based authorization is no longer available for new credentials. For existing key-based credentials, you can keep using keys indefinitely. We recommend switching to role-based authentication using the dedicated button on the configuration page. Dynatrace automatically checks the configuration to ensure the correct configuration of roles.
Key-based authentication is allowed only for AWS GovCloud and China partitions.
If you're a SaaS customer, an ActiveGate capable of monitoring your AWS account for classic (built-in) supported services is already provided and available within the Dynatrace AWS account.
However, to monitor specific non-default AWS Cloud services or if your AWS account exceeds 2,000 AWS resources, you must install and configure an Environment ActiveGate. Follow the ActiveGate installation guide and resume this guide when done.
You must install and configure an Environment ActiveGate if you want to monitor either or both of the following:
- More than 2,000 AWS resources (AWS service instances)
- Non-default AWS Cloud services
Allow ActiveGate to access AWS URLs
The integration accesses the following AWS API endpoints, so they must be accessible from your ActiveGate:
-
AWS Security Token Service (AWS STS)
https://sts.amazonaws.com/AWS STS is a global endpoint by default. When using a regional endpoint,
sts.<REGION>.amazonaws.com
needs to be accessible.See AWS STS Regionalized endpoints in AWS official documentation for the recommended regional STS endpoint configuration.
recommended Use the AWS
config
file to configure regional STS endpoint. -
AWS Resource Groups Tagging
https://tagging.<REGION>.amazonaws.com/ -
Amazon CloudWatch
https://monitoring.<REGION>.amazonaws.com/ -
Amazon EC2
ec2.<REGION>.amazonaws.com
Other endpoints may be required depending on the services you need to monitor.
Consult the tables below for endpoints specific to each service you might want to monitor and for AWS regions supported by Dynatrace AWS Monitoring.
autoscaling.<REGION>.amazonaws.com
lambda.<REGION>.amazonaws.com
elasticloadbalancing.<REGION>.amazonaws.com
dynamodb.<REGION>.amazonaws.com
ec2.<REGION>.amazonaws.com
rds.<REGION>.amazonaws.com
s3.<REGION>.amazonaws.com
acm-pca.<REGION>.amazonaws.com
apigateway.<REGION>.amazonaws.com
apprunner.<REGION>.amazonaws.com
appstream2.<REGION>.amazonaws.com
appsync.<REGION>.amazonaws.com
athena.<REGION>.amazonaws.com
cloudfront.amazonaws.com
cloudhsmv2.<REGION>.amazonaws.com
cloudsearch.<REGION>.amazonaws.com
codebuild.<REGION>.amazonaws.com
datasync.<REGION>.amazonaws.com
dax.<REGION>.amazonaws.com
dms.<REGION>.amazonaws.com
directconnect.<REGION>.amazonaws.com
ecs.<REGION>.amazonaws.com
elasticfilesystem.<REGION>.amazonaws.com
eks.<REGION>.amazonaws.com
elasticache.<REGION>.amazonaws.com
elasticbeanstalk.<REGION>.amazonaws.com
elastictranscoder.<REGION>.amazonaws.com
es.<REGION>.amazonaws.com
events.<REGION>.amazonaws.com
fsx.<REGION>.amazonaws.com
gamelift.<REGION>.amazonaws.com
glue.<REGION>.amazonaws.com
inspector.<REGION>.amazonaws.com
kafka.<REGION>.amazonaws.com
models.lex.<REGION>.amazonaws.com
logs.<REGION>.amazonaws.com
api.mediatailor.<REGION>.amazonaws.com
mediaconnect.<REGION>.amazonaws.com
mediapackage.<REGION>.amazonaws.com
mediapackage-vod.<REGION>.amazonaws.com
opsworks.<REGION>.amazonaws.com
qldb.<REGION>.amazonaws.com
redshift.<REGION>.amazonaws.com
robomaker.<REGION>.amazonaws.com
route53.amazonaws.com
route53resolver.<REGION>.amazonaws.com
api.sagemaker.<REGION>.amazonaws.com
sns.<REGION>.amazonaws.com
sqs.<REGION>.amazonaws.com
storagegateway.<REGION>.amazonaws.com
swf.<REGION>.amazonaws.com
transfer.<REGION>.amazonaws.com
workmail.<REGION>.amazonaws.com
workspaces.<REGION>.amazonaws.com
us-gov-west-1
us-gov-east-1
us-east-1
us-east-2
us-west-1
us-west-2
eu-west-1
eu-west-2
eu-west-3
eu-central-1
eu-central-2
eu-north-1
eu-south-1
eu-south-2
ap-east-1
ap-south-1
ap-south-2
ap-southeast-1
ap-southeast-2
ap-southeast-3
ap-southeast-4
ap-northeast-1
ap-northeast-2
ap-northeast-3
sa-east-1
cn-north-1
cn-northwest-1
ca-central-1
ca-west-1
il-central-1
me-central-1
me-south-1
af-south-1
us-iso-east-1
us-isob-east-1
us-iso-west-1
The most frequent cause of certificate issues with the TLS interception proxy is a missing proxy's CA certificate in the ActiveGate truststore.
If you're still having proxy issues, see:
Make sure that the URLs are whitelisted. Otherwise, you might get communication or timeout errors.
AWS monitoring policy and role-based authentication
To perform these steps, you need to have AWS admin privileges.
The AWS monitoring policy defines the minimal scope of permissions you need to give to Dynatrace to monitor the services running in your AWS account. Create it once and use it any time when enabling Dynatrace access to your AWS account. If you don't want to add permissions to all services, and just select permissions for certain services, consult the table below. The table contains a set of permissions that are required for all AWS cloud services, a list of optional permissions specific to that service.
"cloudwatch:GetMetricData"
"cloudwatch:GetMetricStatistics"
"cloudwatch:ListMetrics"
"sts:GetCallerIdentity"
"tag:GetResources"
"tag:GetTagKeys"
"ec2:DescribeAvailabilityZones"
cloudwatch:GetMetricData
,cloudwatch:GetMetricStatistics
,cloudwatch:ListMetrics
,sts:GetCallerIdentity
,tag:GetResources
,tag:GetTagKeys
,ec2:DescribeAvailabilityZones
acm-pca:ListCertificateAuthorities
apigateway:GET
apprunner:ListServices
appstream:DescribeFleets
appsync:ListGraphqlApis
athena:ListWorkGroups
rds:DescribeDBClusters
autoscaling:DescribeAutoScalingGroups
autoscaling:DescribeAutoScalingGroups
cloudfront:ListDistributions
cloudhsm:DescribeClusters
cloudsearch:DescribeDomains
codebuild:ListProjects
eks:ListClusters
datasync:ListTasks
dax:DescribeClusters
dms:DescribeReplicationInstances
rds:DescribeDBClusters
directconnect:DescribeConnections
dynamodb:ListTables
dynamodb:ListTables
,dynamodb:ListTagsOfResource
ec2:DescribeVolumes
ec2:DescribeVolumes
ec2:DescribeInstances
ec2:DescribeSpotFleetRequests
ecs:ListClusters
ecs:ListClusters
elasticache:DescribeCacheClusters
elasticbeanstalk:DescribeEnvironments
elasticfilesystem:DescribeFileSystems
elasticmapreduce:ListClusters
es:ListDomainNames
elastictranscoder:ListPipelines
elasticloadbalancing:DescribeInstanceHealth
,elasticloadbalancing:DescribeListeners
,elasticloadbalancing:DescribeLoadBalancers
,elasticloadbalancing:DescribeRules
,elasticloadbalancing:DescribeTags
,elasticloadbalancing:DescribeTargetHealth
events:ListEventBuses
fsx:DescribeFileSystems
gamelift:ListFleets
glue:GetJobs
inspector:ListAssessmentTemplates
kafka:ListClusters
kinesisanalytics:ListApplications
firehose:ListDeliveryStreams
kinesis:ListStreams
kinesisvideo:ListStreams
lambda:ListFunctions
lambda:ListFunctions
,lambda:ListTags
lex:GetBots
elasticloadbalancing:DescribeInstanceHealth
,elasticloadbalancing:DescribeListeners
,elasticloadbalancing:DescribeLoadBalancers
,elasticloadbalancing:DescribeRules
,elasticloadbalancing:DescribeTags
,elasticloadbalancing:DescribeTargetHealth
logs:DescribeLogGroups
mediaconnect:ListFlows
mediaconvert:DescribeEndpoints
mediapackage:ListChannels
mediapackage-vod:ListPackagingConfigurations
mediatailor:ListPlaybackConfigurations
ec2:DescribeNatGateways
rds:DescribeDBClusters
opsworks:DescribeStacks
qldb:ListLedgers
rds:DescribeDBInstances
rds:DescribeDBInstances
,rds:DescribeEvents
,rds:ListTagsForResource
redshift:DescribeClusters
robomaker:ListSimulationJobs
route53:ListHostedZones
route53resolver:ListResolverEndpoints
s3:ListAllMyBuckets
s3:ListAllMyBuckets
sagemaker:ListEndpoints
sagemaker:ListEndpoints
sns:ListTopics
sqs:ListQueues
storagegateway:ListGateways
swf:ListDomains
transfer:ListServers
ec2:DescribeTransitGateways
ec2:DescribeVpnConnections
workmail:ListOrganizations
workspaces:DescribeWorkspaces
To get the information required for comprehensive AWS cloud-computing monitoring, you have to authorize Dynatrace to access your Amazon metrics. Dynatrace will identify all the virtualized infrastructure components in your AWS environment and collect performance metrics related to those components.
Next, select the deployment model that best describes your environment and follow the procedure for that model.
Only for AWS GovCloud and China partitions is key-based authentication allowed.
In this scenario you have to create an AWS monitoring policy and generate a key pair with that policy.
AWS Identity and Access Management (IAM) permission boundaries may deny AWS actions required by Dynatrace. If you use IAM permission boundary on your AWS account, make sure that actions from policy are allowed in all AWS regions within permission boundary.
To create the AWS monitoring policy
- In your Amazon Console, go to Identity and Access Management.
- Go to Policies and select Create policy.
- Select the JSON tab and paste the predefined policy from the box below.
{"Version": "2012-10-17","Statement": [{"Sid": "VisualEditor0","Effect": "Allow","Action": ["acm-pca:ListCertificateAuthorities","apigateway:GET","apprunner:ListServices","appstream:DescribeFleets","appsync:ListGraphqlApis","athena:ListWorkGroups","autoscaling:DescribeAutoScalingGroups","cloudformation:ListStackResources","cloudfront:ListDistributions","cloudhsm:DescribeClusters","cloudsearch:DescribeDomains","cloudwatch:GetMetricData","cloudwatch:GetMetricStatistics","cloudwatch:ListMetrics","codebuild:ListProjects","datasync:ListTasks","dax:DescribeClusters","directconnect:DescribeConnections","dms:DescribeReplicationInstances","dynamodb:ListTables","dynamodb:ListTagsOfResource","ec2:DescribeAvailabilityZones","ec2:DescribeInstances","ec2:DescribeNatGateways","ec2:DescribeSpotFleetRequests","ec2:DescribeTransitGateways","ec2:DescribeVolumes","ec2:DescribeVpnConnections","ecs:ListClusters","eks:ListClusters","elasticache:DescribeCacheClusters","elasticbeanstalk:DescribeEnvironmentResources","elasticbeanstalk:DescribeEnvironments","elasticfilesystem:DescribeFileSystems","elasticloadbalancing:DescribeInstanceHealth","elasticloadbalancing:DescribeListeners","elasticloadbalancing:DescribeLoadBalancers","elasticloadbalancing:DescribeRules","elasticloadbalancing:DescribeTags","elasticloadbalancing:DescribeTargetHealth","elasticmapreduce:ListClusters","elastictranscoder:ListPipelines","es:ListDomainNames","events:ListEventBuses","firehose:ListDeliveryStreams","fsx:DescribeFileSystems","gamelift:ListFleets","glue:GetJobs","inspector:ListAssessmentTemplates","kafka:ListClusters","kinesis:ListStreams","kinesisanalytics:ListApplications","kinesisvideo:ListStreams","lambda:ListFunctions","lambda:ListTags","lex:GetBots","logs:DescribeLogGroups","mediaconnect:ListFlows","mediaconvert:DescribeEndpoints","mediapackage-vod:ListPackagingConfigurations","mediapackage:ListChannels","mediatailor:ListPlaybackConfigurations","opsworks:DescribeStacks","qldb:ListLedgers","rds:DescribeDBClusters","rds:DescribeDBInstances","rds:DescribeEvents","rds:ListTagsForResource","redshift:DescribeClusters","robomaker:ListSimulationJobs","route53:ListHostedZones","route53resolver:ListResolverEndpoints","s3:ListAllMyBuckets","sagemaker:ListEndpoints","sns:ListTopics","sqs:ListQueues","storagegateway:ListGateways","sts:GetCallerIdentity","swf:ListDomains","tag:GetResources","tag:GetTagKeys","transfer:ListServers","workmail:ListOrganizations","workspaces:DescribeWorkspaces"],"Resource": "*"}]}
- Give the policy a name.
- Select Create policy.
You'll need to generate an Access key and a Secret access key that Dynatrace can use to get metrics from Amazon Web Services.
- In your Amazon Console, go to Users and select Add Users.
- Enter the User name.
- In the next screen, choose Attach policies directly and attach the policy that you created before.
- Review the user details and select Create user.
- From the list of users, select your newly created user name and go to Security credentials, then select Create access key.
- On Access key best practices & alternatives, select Third-party service, and then select Next.
- On Retrieve access keys, store the Access Key ID name (AKID) and Secret access key values.
- You can either download the user credentials or copy the credentials displayed online (select Show).
Terraform templates are an alternative way of creating and configuring AWS roles. For detailed instructions on how to create AWS roles with Terraform, see Configuring AWS role-based access with Terraform
Create monitoring configuration
You can create, activate, and manage multiple monitoring connections. Each connection is defined by the credentials and/or access tokens required for Dynatrace to be able to pull in the data.
Allowing for multiple connections and configurations makes it possible to monitor even extremely complex environments. With such an approach, you don't need to configure everything at once. Instead, you can gradually add monitoring configurations to your existing setup. Such an architecture also makes it easy to react to the dynamic changes of the monitored environment, without needing to reconfigure the unaffected elements.
Add a new AWS connection
If you've followed all the prior steps, you're ready to configure Amazon Web Services monitoring.
To add a new AWS connection
- Open Clouds app.
- Select Integration manager tab.
- Learn how to navigate and connect a new instance via Integration manager.
AWS cloud services monitored by default
After Dynatrace connects to your AWS environment, it immediately starts monitoring selected AWS services. Classic (formerly "built-in") AWS metrics lists the metrics of AWS cloud services monitored by default.
Monitor other AWS services
In addition to AWS services, it's also possible to monitor all other AWS cloud services. AWS cloud services are enabled for monitoring per AWS connection.
To add a service to monitoring:
- Go to Settings > Cloud and virtualization > AWS.
- On the AWS overview page, find the connection that you want to change and select Edit in that row.
- Under Services, select Manage services.
- Select Add service.
- Select the service from the list and then select Add service.
- Select Save changes to save your configuration.
You can add multiple cloud services by repeating the steps above.
After you add a service, Dynatrace automatically starts collecting a set of metrics for this particular service.
Recommended metrics:
- Enabled by default
- Can not be disabled
- Can come with recommended dimensions (enabled by default, can't be disabled)
- Can come with optional dimensions (disabled by default, can be enabled)
Apart from the recommended metrics, most services have the possibility of enabling optional metrics that can be added and configured manually.
To see the complete list of AWS cloud services and learn about the metrics collected for each of them, see All AWS cloud services.
Alternatively, you can check the list of supported AWS Services within in-product Dynatrace Hub (search for AWS) or in the web version of Dynatrace Hub.
- Go to Settings > Cloud and virtualization > AWS.
- On the AWS overview page, find the connection that you want to change and select the edit icon next to its name.
- Go to Services and select Manage services.
- To add a metric select the service for which you want to add metrics and select Add new metric.
- From the menu select Add metric for the metric you want to monitor.
- Select Edit to configure the metric.
- Select Apply to save your configuration.
After you select the cloud services and save your changes, monitoring of the newly added services starts automatically.
What's next?
Within minutes, you'll see the data on your dashboards.
To see the core measurements per each of the AWS connections
- Go to AWS or AWS Classic (latest Dynatrace).
- Select the connection for which you want to see an overview of the AWS infrastructure.
You can also build your own dashboard from the metrics collected for your AWS instances. For details on building dashboards, see Dashboards Classic.
Dynatrace OneAgent offers unparalleled depth of insight into hosts, containers, and code. To learn more, see Set up Dynatrace on Amazon Web Services.
After you set up AWS monitoring, you can:
- Set up metric events for alerting. This enables you to create, enable, disable and configure recommended alerting rules.
- Limit API calls to AWS using tags. By default, Dynatrace monitors all Amazon Web Services that have been specified in your permission policy. Optionally, you can use tagging to limit the AWS resources that are monitored by Dynatrace.
This method of monitoring does not require an ActiveGate. 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. For details, see Amazon CloudWatch Metric Streams.
It is also possible to trace AWS Lambda .NET Core functions with OpenTelemetry .NET.