Upgrade your Datadog Agent
Overview
Datadog recommends you update your Datadog Agent with every minor and patch release, or, at a minimum, monthly. Upgrading to the latest major Datadog Agent version and keeping it updated is the only supported way to get the latest Agent functionality and fixes.
The Agent has frequent update releases, though, and managing updates at enterprise scale can be challenging. This guide walks you through how to quickly roll out a new Agent version across your hosts in just a few clicks.
Upgrade with Fleet Automation (recommended)
Datadog recommends using Fleet Automation’s Remote Agent Management to upgrade your Agent versions. If you’re already using Remote Agent Management, start an upgrade from Fleet Automation.
If you have not yet enabled remote configuration, follow the configuration instructions to enable it and use the remote agent management feature.
Upgrade between minor versions of the Agent
To upgrade between minor versions of the Agent is to use the install_script_agent7.sh
script. The following commands work on all supported Linux distributions.
- Upgrading to a given Agent minor version:
DD_AGENT_MINOR_VERSION=<target_minor> bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
- Upgrading to the latest Agent minor version:
bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
Download and install the specific version’s installation package.
- URL to download a specific Agent minor version
https://ddagent-windows-stable.s3.amazonaws.com/ddagent-cli-7.<minor_version>.<bugfix_version>.msi
To upgrade between minor version of the Agent is to use the install_mac_os.sh
script. The following commands work on all supported MacOS versions.
- Upgrading to a given Agent minor version:
DD_AGENT_MINOR_VERSION=<target_minor> bash -c "$(curl -L https://install.datadoghq.com/scripts/install_mac_os.sh)"
- Upgrading to the latest Agent minor version:
bash -c "$(curl -L https://install.datadoghq.com/scripts/install_mac_os.sh)"
Upgrade to Datadog Agent 7
From Agent 6
Run the following Agent installation command to upgrade your Agent from version 6 to version 7:
- The following command works on Amazon Linux, CentOS, Debian, Fedora, Red Hat, Ubuntu, and SUSE:
DD_API_KEY="<DATADOG_API_KEY>" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
- Download the Datadog Agent installer.
- Run the installer (as Administrator) by opening
datadog-agent-7-latest.amd64.msi
. - Follow the prompts, accept the license agreement, and enter your Datadog API key.
- When the install finishes, you are given the option to launch the Datadog Agent Manager.
Note: Links to all available versions of the Windows Installer are provided in JSON format.
Run the Agent installation command with the environment variable DD_AGENT_MAJOR_VERSION=7
to upgrade your Agent from version 6 to version 7:
DD_AGENT_MAJOR_VERSION=7 DD_API_KEY="<DATADOG_API_KEY>" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_mac_os.sh)"
From Agent 5
Run the Agent installation command with the environment variable DD_UPGRADE="true"
to upgrade your Agent from version 5 to version 7. The Agent v7 installer can automatically convert v5 configurations during the upgrade:
- The following command works on Amazon Linux, CentOS, Debian, Fedora, Red Hat, Ubuntu, and SUSE:
DD_UPGRADE="true" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
Run the Agent installation command with the environment variable DD_AGENT_MAJOR_VERSION=7
and DD_UPGRADE="true"
to upgrade your Agent from version 5 to version 7. The Agent v7 installer can automatically convert v5 configurations during the upgrade:
DD_UPGRADE="true" DD_AGENT_MAJOR_VERSION=7 bash -c "$(curl -L https://install.datadoghq.com/scripts/install_mac_os.sh)"
Note: The upgrade process won’t automatically move custom Agent checks. This is by design as Datadog cannot guarantee full backwards compatibility out of the box. See the Python 3 Custom Check Migration guide to discover how to migrate your custom check from Python 2 to Python 3.
Further Reading
Additional helpful documentation, links, and articles: