[ Datadog ] Agent Install & Uninstall

Print

■ Agent Install

① Linux

RedHat/CentOS 계열

OSes such as RedHat, CentOS, Amazon Linux, Oracle Linux, Rocky Linux, and Fedora are applicable. This installation guide guides you through RedHat/CentOS 6+ or higher.

- Installing Datadog Agent on the Internet

  • Installing Datadog One Step
    Change <DATADOG API KEY> to the API KEY of the ORG you want to collect and run the command below.

    DD_API_KEY=<DATADOG API KEY> DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
    • The above command is Integration > Agent You can check by selecting OS from the menu.

      image-20240221-090956.png
    • On that screen Command When copying Enable APM Instrumentation(today Beta function)to Off It is recommended to set it to (remove the DD_APM_INSTRUMENTATION_ENABLED=host part in the command)

    • If you only want to check the API Key, Datadog Console 계정 > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

  • Datadog step-by-step installation

    • Create a yum repository (/etc/yum.repos.d/datadog.repo) on the host that will use Datadog and add the content below.

      [datadog]
      name=Datadog, Inc.
      baseurl=https://yum.datadoghq.com/stable/7/x86_64/
      enabled=1
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public 
             https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public
             https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public
             https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public
    • Update the local yum repo and install the Datadog Agent.

      sudo yum makecache
      sudo yum remove datadog-agent-base
      sudo yum install datadog-agent
    • Copy the datadog agent configuration file, change the API Key, and add Datadog site information.

      sudo sh -c "sed 's/api_key:.*/api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
      sudo sh -c "sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml"
    • Set permissions.

      sudo sh -c "chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml && chmod 640 /etc/datadog-agent/datadog.yaml"
    • Restart the Datadog Agent and check the Agent status.

      sudo systemctl restart datadog-agent.service
      sudo datadog-agent status

- Installing Datadog Agent in a closed network

  • Datadog step-by-step installation

    • https://yum.datadoghq.com/stable/7/x86_64/ Download the latest version of the installation package from .
      datadog-agent-7.xx.x-1.x86_64.rpm Please download the latest version of the file in this format.
      ( 2024년 2월 : https://s3.amazonaws.com/yum.datadoghq.com/stable/7/x86_64/datadog-agent-7.50.3-1.x86_64.rpm)

    • Install the package

      sudo yum localinstall datadog-agent-7.50.3-1.x86_64.rpm
      혹은
      sudo rpm -ivh ./ datadog-agent-7.43.1-1.x86_64.rpm3
    • Copy the datadog agent configuration file and change the API Key, add the Datadog site information. The API Key is in the Datadog Consolee Account > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

      sudo sh -c "sed 's/api_key:.*/api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
      sudo sh -c "sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml"
    • Set permissions.

      sudo sh -c "chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml && chmod 640 /etc/datadog-agent/datadog.yaml"
    • Restart the Datadog Agent and check the Agent status.

      sudo systemctl restart datadog-agent.service
      sudo datadog-agent status

Debian/Ubuntu 계열

A representative example is the OS such as Ubuntu. This installation guide guides you through Ubuntu 14.04+.

- Installing Datadog Agent on the Internet

  • Datadog One Step installation
    Run the command below by changing <DATADOG API KEY> to the API KEY of the ORG you want to collect.

    DD_API_KEY=<DATADOG API KEY> DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
    • The above command is Integration > Agent You can check by selecting OS from the menu.

      image-20240221-090956.png
    • When copying the Command from that screen, we recommend setting Enable APM Instrumentation (currently a Beta feature) to Off. (Remove the DD_APM_INSTRUMENTATION_ENABLED=host part in the Command)

    • If you only want to check the API Key, Datadog Console Account > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

  • Datadog step-by-step installation

    • Set apt to download via https and install curl and gnupg.

      sudo apt-get update
      sudo apt-get install apt-transport-https curl gnupg
    • Create a deb repository for the host and create a Datadog archive keyring.

      sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable 7' > /etc/apt/sources.list.d/datadog.list"
      sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg
      sudo chmod a+r /usr/share/keyrings/datadog-archive-keyring.gpg
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_382E94DE.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    • Update local apt repo and install Datadog Agent.

      sudo apt-get update
      sudo apt-get install datadog-agent datadog-signing-keys
    • Copy the datadog agent configuration file, change the API Key, and add Datadog site information.

      sudo sh -c "sed 's/api_key:.*/api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
      sudo sh -c "sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml"
    • Set permissions.

      sudo sh -c "chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml && chmod 640 /etc/datadog-agent/datadog.yaml"
    • Restart the Datadog Agent and check the Agent status.

      sudo systemctl restart datadog-agent.service
      sudo datadog-agent status

- Installing Datadog Agent in a closed network

  • Datadog 단계별 설치

    • https://apt.datadoghq.com/pool/d/da/ Download the latest version of the installation package from .
      datadog-agent-7.xx.x-1_arm64.deb Please download the latest version of the file in this format.
      ( 2024년 2월 : https://s3.amazonaws.com/apt.datadoghq.com/pool/d/da/datadog-agent_7.50.3-1_arm64.deb)

    • Install the package

      sudo apt install ./datadog-agent_7.50.3-1_arm64.deb
    • Copy the datadog agent configuration file, change the API Key, and add Datadog site information.
      API Key is Datadog Console Account > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

      sudo sh -c "sed 's/api_key:.*/api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
      sudo sh -c "sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml"
    • Set permissions.

      sudo sh -c "chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml && chmod 640 /etc/datadog-agent/datadog.yaml"
    • Restart the Datadog Agent and check the Agent status.

      sudo systemctl restart datadog-agent.service
      sudo datadog-agent status

② Windows

This installation guide covers Windows Server 2008 R2+ and above, and does not support lower versions. Windows OS downloads and installs the Datadog Agent Installer (msi) file, so there is no difference in the installation method depending on the network environment.

  • Download the Datadog Agent installer.
    https://s3.amazonaws.com/ddagent-windows-stable/datadog-agent-7-latest.amd64.msi

  • Install datadog-agent-7-latest.amd64.msi with administrator privileges.

    • Agree to the license agreement and enter your Datadog ORG API Key.

    • API Key is Datadog Console Account > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

      image-20240222-050318.png
    • Datadog The area is http://datadoghq.com Select and complete the installation.

      image-20240222-050657.png
    • Restart Datadog Agent and check Agent status.

      Run Datadog Agent Manager with administrator privileges.

      image-20240222-050825.png

      Click Settings on the left menu (screen below). Modify the information to suit your environment, click the Save button, and run Restart Agent. If the status at the top is Connected to Agent, it is normal.

      image-20240222-050908.png

③ Windows AD

Create ddagentuser to install Datadog Agent in User of AD Domain Controller and it needs permission from ‘Performance Monitoring (Performance Monitor Users)’ and ‘Event Log Viewer (Event Log Readers)’ groups.

reference URL: https://docs.datadoghq.com/agent/faq/windows-agent-ddagent-user/#installation-in-a-domain-environment

  1. ddagentuser Create an account.

    • In Server Manager, select Tools > Active Directory Users and Computers (dsa.msc).

    • Right-click in the blank space on the right side of the window with domain information and click ‘New > User’.

    • Enter ddagentuser in the user account information and click ‘Next’.

    • In the Password and Password Policy settings, enter an appropriate password that complies with the security rules (*Note that semicolons (;) should not be used), set the options appropriately, and then click ‘Next’.
      The option is to disable password changes by unchecking the boxes ‘User must change password at next logon’ and ‘Password never expires’.

    • After checking the information, click ‘Finish’.

    • Afterwards, check whether it has been registered normally in the ddagentuser user properties as shown below.

    • Check ‘Unlock Account’ to ensure that you can use your account without any problems.

      image-20240222-051243.png
  2. Add ‘Event Log Readers’ and ‘Performance Monitor Users’ permissions.

    image-20240222-051510.png
  3. Install datadog-agent-7-latest.amd64.msi on the Windows host. Unlike the general Datadog Agent installation in the ‘Windows OS Installation’ above, install it by setting the user and password.

    • In the Command Prompt window, navigate to the location where datadog-agent-7-latest.amd64.msi is located. Then, type the following command:

      msiexec /i datadog-agent-7-latest.amd64.msi DDAGENTUSER_NAME=<도메인컨트롤러주소>\ddagentuser DDAGENTUSER_PASSWORD=<설정한 비밀번호>
      • Change the <domain controller address> and <set password> sections to the domain controller address and the password set in step 1, respectively, and then run the command.

    • Afterwards, when the API key input screen appears, enter the API key.
      API Key is in Datadog Console Account > Organization Settimngs > ACCESS > API Key After selecting KEY, click the Copy button in the pop-up to copy the API KEY.

      image-20240222-050318.png
    • Datadog The area is http://datadoghq.com Select and complete the installation.

      image-20240222-050657.png
    • Restart Datadog Agent and check Agent status.

      Run Datadog Agent Manager with administrator privileges.

      image-20240222-050825.png

      Click Settings on the left menu (screen below). Modify the information to suit your environment, click the Save button, and run Restart Agent. If the status at the top is Connected to Agent, it is normal.

      image-20240222-050908.png

④ Kubernetes

This installation guide provides a Helm method for installing the Datadog agent on Kubernetes environments such as AWS Elastic Kubernetes Service (EKS), Azure Kubernetes Service (AKS), and Google Kubernetes Engine (GKE).

  • Configuring Datadog agent in Kubernetes environment
    The configuration of the Datadog agent in a Kubernetes environment is as follows.

    • datadog-node-agent: Runs on each node as a daemonset and collects node-level information.

    • datadog-cluster-agent: datadog-node-agent directly queries the API server of the Master node. As the cluster grows, the logs of the Master node's API server and etcd increase. Therefore, it acts as a proxy between the API server and the node agent to reduce the server load on the Master node.

      image-20240222-052416.png
  • Install Datadog agent

    • Install Helm.

      Add the Datadog Helm repository and update the repository to the latest version.

      helm repo add datadog https://helm.datadoghq.com
      helm repo update
    • Deploy the Datadog Agent using the values.yaml configuration file.

      • Helm v3+

        helm install <RELEASE_NAME> -f values.yaml --set datadog.apiKey=<DATADOG_API_KEY> datadog/datadog --set targetSystem=<TARGET_SYSTEM>
      • Helm v1/v2

        helm install -f values.yaml --name <RELEASE_NAME> --set datadog.apiKey=<DATADOG_API_KEY> datadog/datadog
    • Metrics are collected after installation.

■ Agent Uninstall

Linux

RedHat/CentOS

Uninstall the Datadog Agent package.

sudo rpm -e <패키지명 예시:datadog-agent-7.50.3-1.x86_64.rpm>
혹은
sudo yum remove datadog-agent

Delete the user and associated directories (/opt/datadog-agent, /etc/datadog-agent, /var/log/datadog).

sudo userdel dd-agent && sudo rm -rf /opt/datadog-agent/ && sudo rm -rf /etc/datadog-agent/ && sudo rm -rf /var/log/datadog/

Debian/Ubuntu

Uninstall the Datadog Agent package.

sudo apt-get remove datadog-agent -y

Or delete all user and associated package data.

sudo apt-get remove --purge datadog-agent -y

Windows

In the Windows search bar, search for add and then select Add or remove programs.

image-20240222-055447.png

After searching for Datadog Agent, select it and click the Uninstall button to remove it.

image-20240222-055552.png

Kubernetes

Delete the Datadog agent and Helm Chart repository using Helm.

helm delete <RELEASE_NAME>
helm repo remove <repo name>

Online consultation

Contact us

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.