Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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 ...
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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
