Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace for ECS Fargate shows only one task at same time


Hello community, I am recently with the task of deploying the Dynatrace agent in containers running on ECS Fargate with Gitlab. This installation task was done prior to the build of the image in a CICD stage. All this seems to work fine but the problem is that I don't see in Dynatrace the correct task number scaling, i.e. I see the first container but not additional ones if I scale in quantity. If I replace the displayed task with a new one, stopping the container, the Host displayed by Dynatrace is the new container. In the process group there is only one host.

# Dynatrace
- DT_HOME=dynatrace
- mkdir -p "$DT_HOME"
- wget -O "$DT_HOME/" "$DT_API_URL/v1/deployment/installer/agent/unix/paas/latest?Api-Token=$DT_API_TOKEN&$DT_ONEAGENT_OPTIONS"
- unzip -d "$DT_HOME" "$DT_HOME/"
- rm "$DT_HOME/"

- ./dynatrace/


OneAgent version 1.259.339.20230228-182655 (NodeJS)
Architecture x86, 64-bit
Cloud EC2
Data center Ashburn, United States
Hypervisor type AWS Nitro
Memory limit 512 MB
PaaS type AWS Fargate
Physical CPU cores 1



DynaMight Legend
DynaMight Legend

@SergioB Im not too familiar with the deployments for Fargate. Are you still having this issue? 


Hi Chad

Yes, the issue continues. Together with our internal contact at Dynatrace, we have carried out a series of tests where we have found that the number of hosts does not vary according to the ECS scaling. In addition to that, we verified that the host remains always the same even when replacing containers, we only see a change of ip referring to the new task created, but is the same host ID. A support case was raised for verification.
Another detail to mention, in our previous PAAS platform this error was not present.

DynaMight Guru
DynaMight Guru

Hi @SergioB I've been investigating your issue. As you indicate this happens when OneAgents are deployed in Fargate, but since they have the same OSI ID, only one shows up in the Front end or WebUI of the tenant when you increase replicas >=2. For standalone/app-only OneAgents (Fargate), OSI ID is determined by the host name.


So, is it possible to make the hostname unique from Fargate's point of view?

Yes, there is a Dynatrace environment variable called DT_HOST_ID that could also be used to make these hosts unique. You would just set this where you set other AWS environment variables and make the value unique for each replica.

But you can also try to add it from the DOCKERFILE, try something like this:


ENTRYPOINT ["sh", "-c","export DT_HOST_ID=XXXYYYZZZ-$RANDOM && java"]


Change XXXYYYZZZ to whatever you want.

Let us know how it goes.

The true delight is in the finding out rather than in the knowing.

Featured Posts