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

OneAgent on Fargate

patb23
Newcomer

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?

FROM node
ARG MASTER_NAME
ARG DT_API_URL="https://myenv.live.dynatrace.com/api"
ARG DT_API_TOKEN
ARG DT_ONEAGENT_OPTIONS="flavor=default&include=nodejs"
ENV DT_HOME="/opt/dynatrace/oneagent"
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" && \
rm "$DT_HOME/oneagent.zip"

WORKDIR /server

COPY . /server

RUN npm install

EXPOSE 3000
ENTRYPOINT [ "/opt/dynatrace/oneagent/dynatrace-agent64.sh" ]
CMD ["npm", "start"]
6 REPLIES 6

steve_caron
Dynatrace Advisor
Dynatrace Advisor

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.

rodrigo_alvare1
Dynatrace Pro
Dynatrace Pro

Hello,
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 .

Regards

rohit_upadhyay
Newcomer

Hi @patb23  ,

 

I'm facing the exact issue , do let me know if there's a solution or workaround for this issue.

 

Regards,

Rohit U

Hi, any updates on this error? I have the same problem and message.

Dynatrace Professional

Hi Rodrigo, 
Are you using build/auto/runtime injection ? https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-cloud-platforms/amazon-web-s...

Verify if you are using alpine linux or not
(if alpine, the oneagent image name will be : /linux/oneagent-codemodules-musl:<technology> )

Check the cloudwatch logs any reference to oneAgent or add the environment variable "DT_LOGLEVELCON=info" to get more details.
If still not seeing any information, try to run the image locally and you can ssh into the container and verify if the oneagent is running inside of the container.
Some related errors I have seen in the past is that the Dynatrace cluster or the repo where the oneagent image is, does not has a valid certificate, so docker will fail when pulling the image.