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

Posted July 21, 2016 6.4k views

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?

  • I am very interested in this as well. I’d like some way to see my usage over time so I know when I should be upgrading in the future.

  • From looking network traffic while browsing the GUI, I can see the following call made to the v1 interface:{id}/statistics/bandwidth?period=hour

    This would indicate to me that v1 is not fully deprecated and is supported in some level. My problem is that hitting via the dop python module gives me a 410 –“ API v1 has reached end-of-life. Please use API v2.”

    Are there any python or CURL examples of using the v1 API that still work?

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.

Submit an Answer
2 answers

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.

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.