Downgrade the Agent to a prior major version
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
Downgrade the Agent from v7 to v6
First, uninstall Agent v7 from your system.
Then, if you followed the instructions to upgrade from v6 to v7, run the following Agent installation command to downgrade your Agent from version 7 to version 6:
DD_API_KEY="<DATADOG_API_KEY>" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent6.sh)"
The command works on all supported versions of Amazon Linux, CentOS, Debian, Fedora, Red Hat, Ubuntu, and SUSE.
First, uninstall Agent v7 from your system.
Then, if you followed the instructions to upgrade from v6 to v7, run the Agent installation command with the environment variable DD_AGENT_MAJOR_VERSION=6
to downgrade your Agent from version 7 to version 6:
DD_AGENT_MAJOR_VERSION=6 DD_API_KEY="<DATADOG_API_KEY>" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_mac_os.sh)"
Downgrade the Agent from v6 to v5
This guide assumes you upgraded to the Agent v6 using the upgrade guide. If so, choose your OS to see the detailed instructions on how to downgrade your Agent from version 6 to version 5:
Debian Flavored Systems:
Set up apt so it can download through https and install curl
and gnupg
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg
Remove Beta Repo and Ensure the stable repo is present:
sudo rm /etc/apt/sources.list.d/datadog-beta.list
[ ! -f /etc/apt/sources.list.d/datadog.list ] && echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable main' | sudo tee /etc/apt/sources.list.d/datadog.list
sudo touch /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_06462314.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
If running Ubuntu 14 or earlier or Debian 8 or earlier, copy the keyring to /etc/apt/trusted.gpg.d
:
sudo cp /usr/share/keyrings/datadog-archive-keyring.gpg /etc/apt/trusted.gpg.d
Update apt and downgrade the Agent:
sudo apt-get update
sudo apt-get remove datadog-agent
sudo apt-get install datadog-agent
Back-sync configurations and AutoDiscovery templates (optional)
If you made any changes to your configurations or templates, you might want to sync these back for Agent v5.
Note: If you made any changes to your configurations to support Agent v6 only options, these do not work with Agent v5.
Back-sync custom checks (optional):
If you made any changes or added any new custom checks while testing Agent 6 you might want to enable them back on Agent 5. Note: You only need to copy back checks you changed.
sudo -u dd-agent -- cp /etc/datadog-agent/checks.d/<CHECK>.py /etc/dd-agent/checks.d/
Restart the Agent:
sudo systemctl restart datadog-agent # Systemd
sudo /etc/init.d/datadog-agent restart # Upstart
Clean out /etc/datadog-agent
(optional):
sudo -u dd-agent -- rm -rf /etc/datadog-agent/
Red Hat Flavored Systems:
Remove the Beta Yum repo from your system:
rm /etc/yum.repos.d/datadog-beta.repo
[ ! -f /etc/yum.repos.d/datadog.repo ] && echo -e '[datadog]\nname = Datadog, Inc.\nbaseurl = https://yum.datadoghq.com/rpm/x86_64/ \nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\npriority=1\ngpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public\n https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public\n https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public\n https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public\n https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public' | sudo tee /etc/yum.repos.d/datadog.repo
Note: due to a bug in dnf, use repo_gpgcheck=0
instead of repo_gpgcheck=1
on RHEL/CentOS 8.1.
Update your local yum cache and downgrade the Agent
sudo yum clean expire-cache metadata
sudo yum check-update
sudo yum remove datadog-agent
sudo yum install datadog-agent
Back-sync configurations and AutoDiscovery templates (optional)
If you made any changes to your configurations or templates, you might want to sync these back for Agent v5.
Note: If you made any changes to your configurations to support Agent v6 only options, these do not work with Agent v5.
Back-sync custom checks (optional):
If you made any changes or added any new custom checks while testing Agent 6 you might want to enable them back on Agent 5. Note: You only need to copy back checks you changed.
sudo -u dd-agent -- cp /etc/datadog-agent/checks.d/<CHECK>.py /etc/dd-agent/checks.d/
Restart the Agent:
sudo systemctl restart datadog-agent # Systemd
sudo /etc/init.d/datadog-agent restart # Upstart
Clean out /etc/datadog-agent
(optional):
sudo -u dd-agent -- rm -rf /etc/datadog-agent/
- Stop the Agent with the systray app, if it’s running.
- Exit the systray app.
- Uninstall the Datadog Agent application.
- Install the Agent 5 DMG package using your preferred installation method.