By sdriyaz712
I am planning to create a managed hosting solution for my clients using DigitalOcean droplets. I could successfully go through all the operation/billing options using digitalocean API, except the overuse of bandwidth.
The digitalocean api https://docs.digitalocean.com/reference/api/api-reference/#operation/get_user_information does not provide metric tracking such as cpu usage, memory usage, and transfer.
I went through the following options options:
Install DigitalOcean agent (https://www.digitalocean.com/community/questions/how-to-check-bandwidth-usage-in-december-2020), which may lead us to revoke the root access as the malicious customer might mess up the metric tracking. This might be the case of cloudways.
Manually tracking metrics based on billing, which seems counterproductive.
I’m not sure about how Laravel Forge and ServerPilot tracks the bandwidth usage. Is there any other way to track them seamlessly while also granting root access to the user?
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!
Accepted Answer
Hey @sdriyaz712!
You should be able to access droplet specific, bandwidth, CPU and RAM usage through the api. It is available under the monitoring section here: Droplet Bandwidth API
That data should be able to be queried directly through the api without the need of the agent.
Hope it helps! Nate
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.