Question

Is there any way to get stats about CPU and Disk Usage of droplets using D.O. APIv2 ?

I’m using D.O. API v2 to retrieve data/stats of my droplets and what I want to know is how to get stats (using APIv2) about how much CPU is being used and how much Disk has been used by my droplets?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
October 26, 2021
Accepted Answer

Hello,

Just a quick update here. DigitalOcean now has a Monitoring API endpoint that you could use. For more information you can take a look at the official API documentation here:

https://docs.digitalocean.com/reference/api/api-reference/#tag/Monitoring

Also, keep in mind that you need to have the DigitalOcean Metrics Agent installed on your Droplet in order to get some data back.

You can install the do-agent as per the instructions here:

https://docs.digitalocean.com/products/monitoring/how-to/install-agent/

Hope that this helps. Best, Bobby

Brook Shelley
DigitalOcean Employee
DigitalOcean Employee badge
July 22, 2016

All of the current APIv2 endpoints are listed here and currently we do not have any API access for monitoring tools. You may be able to set something like this up with a tool like Nagios, or another monitoring tool though.

Would be nice to be able to retrieve CPU load and Disk I/O via API. I think that for simple droplets this could obviate the installation of an additional monitoring tools, especially if you are using the API for all other stuff.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.