Adding Digital Ocean Insights to droplet

The digital ocean instructions for adding their insights agent use the out of date apt-key mechanism

Installing using the latest method is simple – make sure the keyrings directory exists:

mkdir -p /etc/apt/keyrings

Then download the key and dearmour to the keyrings directory as follows:

curl https://repos.insights.digitalocean.com/sonar-agent.asc | sudo gpg --dearmour | sudo tee /etc/apt/keyrings/do-insights-repo.gpg > /dev/null

the create the repo source:

echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/do-insights-repo.gpg] https://repos.insights.digitalocean.com/apt/do-agent/ main main" | sudo tee /etc/apt/sources.list.d/digitalocean-agent.list

Then update the repos:

sudo apt update

Install the agent:

sudo apt install do-agent

Check it’s running using:

ps aux | grep do-agent

Now check on the Digital Ocean dashboard you should 5 graphs on the droplet’s Graphs tab instead of 3.