Monitor Amazon Web Services with Amazon CloudWatch metrics
Follow this guide to start ingesting data remotely from Amazon CloudWatch.
This guide focuses on infrastructure monitoring of Amazon Web Services 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 or, at scale, using the Dynatrace API.
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.
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 the AWS monitoring configuration, you need the Change monitoring settings permission in Dynatrace. See Users groups, permissions and policies 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.
If you're a SaaS customer, an ActiveGate capable of monitoring your AWS account is already provided and available within the Dynatrace AWS account.
To add an ActiveGate that is capable of cloud monitoring, 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)
The integration accesses the following AWS API endpoints, so they must be accessible from your ActiveGate:
AWS Security Token Service
bash
https://sts.amazonaws.com/
The AWS Security Token Service is a global endpoint by default. In case of using a regional endpoint, sts.<REGION>.amazonaws.com needs to be accessible.
AWS Resource Groups Tagging
bash
https://tagging.<REGION>.amazonaws.com/
Amazon CloudWatch
bash
https://monitoring.<REGION>.amazonaws.com/
Amazon EC2
bash
ec2.<REGION>.amazonaws.com
Other endpoints may be required depending on the services you need to monitor. Consult the table below for endpoints specific to each service you might want to monitor.
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 services (All monitored Amazon services) and, for each cloud service, a list of optional permissions specific to that service.
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.
Dynatrace SaaS needs a role-based monitoring access to your AWS account
You won't be able to monitor the AWS cloud services without an AWS-hosted Environment ActiveGate.
You will need:
AWS account ID
Rights to assign role-based access to your AWS account
External ID, which can be acquired as follows.
Go to Settings > Cloud and virtualization > AWS.
Select Connect new Instance.
Under Authentication method select Role-based authentication.
Under Your Amazon account ID select Copy to copy the token (External ID).
The instructions below are applicable whether or not the account hosting your ActiveGate is the same as your monitored account. In a typical setup, you need to create two CloudFormation stacks using CloudFormation templates:
A CloudFormation stack from the account hosting your ActiveGate, containing the following resources:
An ActiveGate installed on an Amazon EC2 host. It must be able to assume a role within your AWS account that allows it to read the Dynatrace monitoring data.
The ID of the AWS account that hosts the ActiveGate (the account that hosts your Dynatrace components, which in this case is the one hosting the Environment ActiveGate).
The Amazon Web Services monitored account ID (the account that you want to monitor).
The name of the role with which your Environment ActiveGate was started.
The External ID, which you can get as follows.
Go to Settings and select Cloud and virtualization > AWS
Select Connect new instance
Under Authentication method, select Role-based authentication.
Under Token, select Copy to copy the token (the External ID) to your clipboard.
Go to Stacks and create a new stack with new resources.
Select Template is ready, upload the template you created above, and select Next.
In Parameters, enter External ID, ActiveGateRoleName and ActiveGateAccountID from the stack created in Step 2.3.2.1. Optionally, adapt other parameters if needed.
Enter a name for your stack, and then select Next twice.
Review your configuration, enable I acknowledge that AWS CloudFormation might create IAM resources with custom names, and select Submit.
You can also create a stack via CLI using the command below:
Starting with ActiveGate version 1.217, AWS monitoring is enabled by default. For configuration details, see Customize ActiveGate properties. The following configuration settings refer to earlier ActiveGate versions.
Edit the custom.properties file of your Environment ActiveGate.
Key-based authentication is only allowed for AWS GovCloud and China partitions.
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.
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.
In the Access key best practices & alternatives screen, select Third-party service, then select Next.
You will be transferred to the Retrieve access keys screen, where both your Access key and a Secret access key are present.
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).
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
AWS cloud services monitored by default
Other AWS services
Add a new AWS connection
If you have followed all the prior steps, you are ready to configure Amazon Web Services monitoring.
To add a new AWS connection
In the Dynatrace menu, go to Settings and select Cloud and virtualization > AWS. The AWS page lists AWS connections already configured.
If you haven't provided an ActiveGate required for AWS monitoring (check Prerequisites for details), the respective information will be provided on the screen and you will not be able to continue with the configuration process.
You can limit the data acquired from the CloudWatch by defining a tag-based filter of specific resources. See Limit API calls to AWS using tags for more details on tag-based filtering.
AWS cloud services monitored by default
After Dynatrace connects to your AWS environment, it immediately starts monitoring selected AWS services. Default 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:
In the Dynatrace menu, go to Settings and select 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.
To see the complete list of AWS cloud services and learn about the metrics collected for each of them, see Amazon Web Services.
Alternatively, you can check the list of supported AWS Services on Dynatrace Hub or within the in-product Hub: in the Dynatrace menu, go to Dynatrace Hub and search for AWS.
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 Integrate Amazon CloudWatch Metric Streams.