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
asked 7 months ago115 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions