I am trying to enable monitoring on a Task running Node.js on AWS Fargate - the base image is node. I followed the steps outlined in Install OneAgent, no errors found at the time of build and after running the task, I could see in the logs that it prints the following:
Info: Using DT_HOME: /opt/dynatrace/oneagent
I don't see any other Dynatrace specific error on INFO messages. The ECS Fargate is not listed in my Dashboard.
I am also sharing the content of Dockerfile below, could I get help on what is missing or what I didn't follow in the instructions?
RUN mkdir -p "$DT_HOME" && \
wget -O "$DT_HOME/oneagent.zip" "$DT_API_URL/v1/deployment/installer/agent/unix/paas/latest?Api-Token=$DT_API_TOKEN&$DT_ONEAGENT_OPTIONS" && \
unzip -d "$DT_HOME" "$DT_HOME/oneagent.zip" && \
COPY . /server
RUN npm install
ENTRYPOINT [ "/opt/dynatrace/oneagent/dynatrace-agent64.sh" ]
CMD ["npm", "start"]
Quick question: are you sure you used a PaaS token (for the value of DT_API_TOKEN)? Even though the variable is named DT_API_TOKEN, what is needed is a PaaS token and not an API token. That's a common source of errors, that's why I'm asking.
Thanks for helping with this. Yes, I used one of the 2 PaaS tokens I had on my account.
Please note that I am able to monitor my app running on EC2 - deployed both OneAgent and ActiveGate for that.
Are you running the container alone or the task also deploys any other security container? ( As I have seen in the past some solutions that conflicted with Dynatrace OneAgent)
The message you see "Info: Using DT_HOME: /opt/dynatrace/oneagent " comes from the execution of "/opt/dynatrace/oneagent/dynatrace-agent64.sh"
By default Dynatrace oneAgent does not print information into cloudwatch as it can be too chatty, but you can enable that for NGINX with the environment variable DT_NGINX_OPTIONS=loglevelconinfo.
With that option enabled you will see the Dynatrace OneAgent logs in CloudWatch .