Hi Ernesto, Thanks for the information! I didn’t know about the existence of the REST Dashboard API. I will check that out, Thanks again!
Sinan > Op 11 okt. 2019 om 21:06 heeft Ernesto Puerta <epuer...@redhat.com> het > volgende geschreven: > > Hi Sinan, > > If it's in the Dashboard, it sure comes from the Dashboard REST API (which is > an API completely unrelated to the RESTful Module). > > To check the Dashboard REST API, log in there and click on the top-right "?" > menu, and in the dropdown, click on "API". That will lead you to the > Swagger/OpenAPI spec of the Dashboard. You will likely want to explore the > "/pool" and "/block" endpoints. The API page will give you ready-to-use curl > commands (the only thing you'd need to renew, once expired, is the > authorization token). > > Kind regards, > > Ernesto Puerta > He / Him / His > Senior Software Engineer, Ceph > Red Hat > > > >> On Thu, Oct 10, 2019 at 2:16 PM Sinan Polat <si...@turka.nl> wrote: >> Hi, >> >> Currently I am getting the pool statistics (especially USED/MAX AVAIL) via >> the command line: >> ceph df -f json-pretty| jq '.pools[] | select(.name == "poolname") | >> .stats.max_avail' >> ceph df -f json-pretty| jq '.pools[] | select(.name == "poolname") | >> .stats.bytes_used' >> >> Command "ceph df" does not show the (total) size of the provisioned RBD >> images. It only shows the real usage. >> >> I managed to get the total size of provisioned images using the Python rbd >> module https://docs.ceph.com/docs/master/rbd/api/librbdpy/ >> >> Using the same Python module I also would like to get the USED/MAX AVAIL per >> pool. That should be possible using rbd.RBD().pool_stats_get, but >> unfortunately my python-rbd version doesn't support that (running 12.2.8). >> >> So I went ahead and enabled the dashboard to see if the data is present in >> the dashboard and it seems it is. Next step is to enable the restful module >> and access this information, right? But unfortunately the restful api >> doesn't provide this information. >> >> My question is, how can I access the USED/MAX AVAIL information of a pool >> without using the ceph command line and without upgrading my python-rbd >> package? >> >> Kind regards >> Sinan Polat >> >> _______________________________________________ >> ceph-users mailing list >> ceph-users@lists.ceph.com >> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com