Configure Datadog on Elastic Beanstalk EC2 Instances

0

I need to install the Datadog agent on the Amazon Linux ec2 instances that are under the elastic beanstalk. I’m following the below documentation however after doing that, when I ssh to the ec2 to check, it seems like the agent is not installed. I tried to run the agent installation command manually and it's working fine but when i add the same command in .ebextensions to automate the process, it doesn’t work. [https://docs.datadoghq.com/integrations/amazon_elasticbeanstalk/?](Datadog Documentation)

this is the structure of the code: Enter image description here

I have checked all the logs before the datadog wasn’t mentioned at all it seems like the Elastic beanstalk doesn’t see the file i put in the .ebextensions directory because when i ssh into the ec2 , and do

$ sudo service datadog-agent status
$ cat /etc/datadog-agent/datadog.yaml
$ cat /var/log/datadog/agent.log

It doesn’t create anything related to the datadog at all. It doesn’t even create any datadog directory

I tried to run the below command manually and it's working fine and the agent is installed (i have added the API key instead of "unused" word). However, when I add the same command in .ebextensions to automate the process, it doesn’t work.

DD_API_KEY= unused SITE="datadoghq.eu" DD_APM_INSTRUMENTATION_ENABLED=host bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"

Your help will be much appreciated.

profile picture
gefragt vor 8 Monaten118 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen