Object Storage

Monitoring tenant or bucket free space



We would like to monitor storagegrid tenant freespace (and per bucket usage if possible) from nagios, is there any API scripts out there that I can reuse?


Thanks ...





I am not an expert on API scripting, but I did play with the REST API page (NMS > Help > API Documentation) in a StorageGRID lab to find some more information.


Using GET /grid/accounts, I was able to retrieve a list of tenant account IDs and their quotas in bytes.


Next, I ran GET /grid/accounts/{id}/usage replacing the {id} portion with the desired tenant ID. This API call returned the total number of objects and data usage in bytes for the tenant, as well as the tenant's buckets, per-bucket object count, and per-bucket data usage in bytes.


You can use the first API call to get the tenant IDs and quotas, and then subtract the buckets' data usage from the second API call to get the free capacity remaining. I do not have a script file that puts that all together for us, but the information above is a start.

Team NetApp
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.