Closed sdwru closed 2 years ago
Just wondering if I should do this myself or wait? I need this for a project I am working on but it might be awhile before I have time to submit a pull request for it.
I'd say it'd be best to implement this yourself. By both implementing and using the change you can be sure it works.
They did this api a little differently than usual so I can't just go by other examples in this sdk. They have sub and sub sub urls on this one
monitoring/alerts , get all, create, destoy
monitoring/metrics/droplets, get -- bandwidth, cpu, filesystem free, filesystem size, load 1, load 5, load 15, free mem, cached mem, total mem, avail mem.
https://docs.digitalocean.com/reference/api/api-reference/#tag/Monitoring
If someone can give an example what file structure this should have it would be helpful so that I can eventually merge this here.
Right now I am doing the basic structure this way:
Api/Monitoring.php
Entity/MonitoringAlert.php
Entity/MonitoringMetric.php
Monitoring.php
has the following methods
// Alerts sub url
getAlerts()
getAlert(someAlertId)
// Droplet metrics sub sub url
getDropletCpu()
getDropletBandwidth()
getDropletLoad1()
...
...
Am I on the right track so far or does it need to be broken up further or differently?
Added in v4.4.0. :)
I think this is a recent addition.
https://docs.digitalocean.com/reference/api/api-reference/#tag/Monitoring