To deploy OneAgent on AWS Elastic Container Service (ECS) clusters with EC2 launch type, follow the instructions below.
ecsinstanceRole
IAM role in the ECS console.This approach describes the installation of OneAgent as a daemon service in its own container. ECS orchestrates the execution of the OneAgent task on each container instance that is part of the cluster.
On the ECS console, go to Task Definitions > Create new Task Definition. Select EC2 and then Next step.
In Configure task and container definitions, enter the following values:
oneagent
host
Scroll down to Volumes. Click Add volume and enter the following values:
oneagent
Bind Mount
/
Click Add to add the volume.
Scroll to Container Definitions and click Add container. In the Standard section, enter the following values:
oneagent
dynatrace/oneagent
There are two types of memory limits: soft and hard. ECS requires that you define the limit for at least one type of memory. We recommend using the default setting (soft limit of 256 MiBs), as it's less restrictive, but you can adjust this setting as needed.
In the Advanced container configuration section, go to Environment. Make sure that Essential is selected.
In Environment variables, define ONEAGENT_INSTALLER_SCRIPT_URL
depending on how you connect to Dynatrace:
https://<your-environment-id>.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default&Api-Token=<pass_token>
https://<your-domain>/e/<your-environment-id>/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default&Api-Token=<pass_token>
https://<your-active-gate-ip-or-hostname>:9999/e/<your-environment-id>/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default&Api-Token=<paas_token>
If you connect via an ActiveGate, you can skip the certificate check by adding the ONEAGENT_INSTALLER_SKIP_CERT_CHECK
key with the value true
.
optional Add OneAgent installer parameters.
While still in Environment variables, you can customize your OneAgent installation by adding several OneAgent installer parameters in the command text box. Make sure to separate each parameter by a space. For example, --set-infra-only=true --set-app-log-content-access=false --set-network-zone=<your.network.zone>
.
Set the --set-network-zone=<your.network.zone>
parameter if you want to configure network zones. See network zones for more information.
Go to Storage and logging and enter the following values in Mount point:
oneagent
/mnt/root
Scroll down to Security and set the container to run in Privileged mode.
Click Add to add the container definition.
While still in the task definition, go back to Volumes and click Configure via JSON. Add the following two parameters at the root level (for example, before the "tags"
):
"ipcMode": "host","pidMode": "host",
Click Save to save the JSON configuration.
Click Create to save your task definition.
In the Task definitions menu, select the newly created OneAgent task and then click Actions > Create service. This will create a service to run your task.
In Configure service, enter the following values:
EC2
oneagent
DAEMON
Leave the rest of the settings set as they are by default. Follow the remaining steps until you reach and select Create service.
Once the service is created, the associated tasks will be executed. The oneagent
service creates a task to deploy OneAgent on each container instance of your cluster.
You can see the container instances displayed on the ECS cluster dashboard, and the corresponding hosts in your Dynatrace monitoring environment.
After deploying OneAgent, restart the running application tasks to get service-level visibility.
See Docker security implications for details.
See Docker limitations for details.
For Elastic Container Service, monitoring consumption is based on hosts units. See Application and Infrastructure Monitoring (Host Units) for details.