How to Install the DigitalOcean Metrics Agent

Validated on 3 Jul 2025 • Last edited on 14 Jul 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.

The DigitalOcean metrics agent is an open-source Go utility that collects system-level metrics and forwards them to DigitalOcean. It enables extended Droplet monitoring features, including usage graphs, alerting, and custom metrics.

The metrics agent is supported on Ubuntu 14.04 or later, CentOS 6 or later, Debian 8 or later, and Fedora 27 or later. You can install it during Droplet creation, manually afterward using a script, by configuring repositories directly, or run it as a Docker container. To stop using the agent, you can uninstall it at any time.

The metrics agent runs as an unprivileged user and only has access to the following directories:

  • /proc: collects system state data
  • /var/opt: stores authentication information
  • /opt/digitalocean: stores the agent binary

The agent reports process names to help guide product development but does not report environment variables or process arguments. You can opt out of process name collection, if needed.

The agent uses only outbound network connections on ports:

  • 80, which contacts the DigitalOcean metadata service to obtain an authentication token.
  • 443, which sends encrypted metrics data to the backend.

The agent uses only outbound connections and does not open any ports, so it does not interfere with existing services or workloads.

Enable the Metrics Agent During Droplet Creation

You can enable monitoring when you create a Droplet under the We recommend these options section, by clicking Enable Monitoring.

Alternatively, you can enable monitoring via the DigitalOcean API or CLI by:

Install the Metrics Agent Manually Using the Script

The installation script detects your operating system, configures the correct DigitalOcean package repository, installs the do-agent package using your system’s package manager, and enables the service.

To begin installing the metrics agent, go to the DigitalOcean Control Panel Droplet page and find the Droplet where you want to install the metrics agent for.

Afterwards, beside the Droplet, click its More menu, and then click Access Console to open the Droplet’s Access page. On the Access page, under the Droplet Console section, log in as root, and then click Launch Droplet Console to open the Droplet’s DigitalOcean Droplet Web Console.

You can run the script directly or review it before executing.

Download and Run Script

To install the agent in a single step, download the metrics agent installation script and run it immediately:

curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash

After you run the command, the script verifies compatibility, installs system dependencies, adds the appropriate package repositories, and installs the metrics agent. The script returns output similar to the following:

Cleaning up old sources...OK
Verifying machine compatibility...OK
Verifying compatibility with script...OK
Installing apt repository...
...
Installing gpg key...Selecting previously unselected package do-agent.
...
Preparing to unpack .../do-agent_3.17.1_amd64.deb ...
Unpacking do-agent (3.17.1) ...
Setting up do-agent (3.17.1) ...
Detecting SELinux
SELinux not enforced
enable systemd service
Created symlink '/etc/systemd/system/multi-user.target.wants/do-agent.service' → '/etc/systemd/system/do-agent.service'.
...

After you run the script, verify the agent is running.

Download, Inspect, and Run Script

Alternatively, you can review the script before running it to audit the changes it makes to your system. This helps maintain transparency, especially in production environments or when internal security policies require script review.

To review the script before running it, save the script to /tmp/install.sh:

curl -sSL https://repos.insights.digitalocean.com/install.sh -o /tmp/install.sh

This command produces no output. To confirm the file was downloaded successfully, check that it exists and has content using the following command:

ls -lh /tmp/install.sh

If the download was successful, the command returns output similar to this, confirming that the file exists at /tmp/install.sh:

-rw-r--r-- 1 root root 7.2K ... /tmp/install.sh

Then, run a less command to view the script contents:

less /tmp/install.sh

After reviewing the script, type q to exit the viewer.

If you prefer not to use the installation script, you can install the agent manually using the repository.

After reviewing the script, run the script manually with administrative privileges, completing the installation:

sudo bash /tmp/install.sh

The output confirms that the script verified compatibility, installed the do-agent package, and enabled the agent service to start on boot, like this:

Cleaning up old sources...OK
Verifying machine compatibility...OK
Verifying compatibility with script...OK
Installing apt repository...
Installing gpg key...Selecting previously unselected package do-agent.
(Reading database ... 76045 files and directories currently installed.)
Preparing to unpack .../do-agent_3.17.1_amd64.deb ...
Unpacking do-agent (3.17.1) ...
Setting up do-agent (3.17.1) ...
Detecting SELinux
SELinux not enforced
useradd: user 'do-agent' already exists
enable systemd service
Created symlink '/etc/systemd/system/multi-user.target.wants/do-agent.service' → '/etc/systemd/system/do-agent.service'.
...

After installation, verify that the agent is running.

In the control panel, go to your Droplet’s Graphs tab to view metrics. The metrics data appears a few minutes after the agent starts and begins reporting data.

Verify the Metrics Agent is Running

To check if the status of the do-agent systemd service is active, run:

systemctl status do-agent

If your metrics agent is active, you see output confirming that the agent is installed, actively running, and set to start automatically on boot:

● do-agent.service - The DigitalOcean Monitoring Agent
     Loaded: loaded (/etc/systemd/system/do-agent.service; enabled; preset: enabl>
     Active: active (running) since Wed 2025-06-18 19:14:50 UTC; 35s ago
 Invocation: da1c6db71e3b46f7919b61a295db71c1
   Main PID: 4675 (do-agent)
      Tasks: 4 (limit: 4655)
     Memory: 3.7M (peak: 4.1M)
        CPU: 51ms
     CGroup: /system.slice/do-agent.service
             └─4675 /opt/digitalocean/bin/do-agent --syslog

Next, check if the agent process is running directly by searching for any running processes with the name do-agent:

ps aux | grep do-agent

If your metrics agent is running, you should see output that includes a line confirming the agent is running as a background process, like this:

do-agent    4675  0.0  0.3 1237180 14712 ?       Ssl  19:14   0:00 /opt/digitalocean/bin/do-agent --syslog
root        4733  0.0  0.0   7156  2144 pts/0    S+   19:15   0:00 grep --color=auto do-agent

If the service is not running or these commands return no output, contact DigitalOcean support for help troubleshooting the installation.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.