Question

Retrive monitoring data via Java

Posted February 20, 2021 300 views
APIMonitoringJava

Hello, I’m new in usage of Digital Ocean API. I’m wondering - could I get monitoring data from my droplet by java? For example could get cpu itilization or memory usage by Java? I want to write small application for notifications when any metric crosses the limit.

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
1 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