How to Upgrade from the Legacy Metrics Agent to the Current Agent
Validated on 8 Nov 2019 • Last edited on 14 Apr 2025
DigitalOcean Monitoring is a free, opt-in service that lets you track Droplet resource usage in real time, visualize performance metrics, and receive alerts via email or Slack to proactively manage your infrastructure’s health.
On 8 April, 2019, we released a new Prometheus-based metrics agent into production. All agent installations on or after this date receive the new agent by default. On 8 July, 2019, the legacy metrics agent was deprecated and Droplets running the legacy agent no longer display extended metrics.
If you are currently running the legacy metrics agent, follow the instructions here to upgrade. If you want to install the metrics agent for the first time, refer to the agent installation instructions.
The upgrade process involves two steps:
-
Uninstall the legacy metrics agent.
On Debian-based operating systems (like Ubuntu), use
apt-get
:sudo apt-get purge do-agent
On RHEL-based operating systems (like CentOS and Fedora), use
yum
:sudo yum remove do-agent
-
Install the current metrics agent.
You can do this by automatically running the installation script with
curl ... | bash
, as below, or you can download the script, inspect it, and run it manually.Download the installation script:
curl -sSL https://repos.insights.digitalocean.com/install.sh -o /tmp/install.sh
Then run the installation using Bash:
sudo bash /tmp/install.sh
-
Confirm installation.
Confirm the metrics agent’s installation:
/opt/digitalocean/bin/do-agent --version
When the agent is successfully installed, this command returns the version information of the DigitalOcean Metrics Agent, which should be 3.x or higher. If the version information displays a version number below 3.x, the agent installation may have failed.
If you receive the message -bash: /opt/digitalocean/bin/do-agent: No such file or directory
, verify that the agent was installed in the correct directory.
You can update multiple Droplets at once with the upgrade-droplets.sh
script provided in the do-agent
GitHub repository. You need an SSH key and a DigitalOcean API token.
Alternatively, an Ansible-based batch upgrade is available on Ansible Galaxy.