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
질문됨 8달 전118회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠