#How do I check capacity via REST API call ?

1 messages · Page 1 of 1 (latest)

sharp egret
#

Me and my colleague looked at this and we cannot find any direct reference in the doc (grid/apidocs.html) regarding capacity information.

StorageGRID®
Version 11.6.0.7

tawny ingot
#

only way i have done this is through curl metrics commands

lost coyote
#

What is the operation that we use to get capacity amounts. IE.. Used, Total etc...

last badge
#

Look at the API "/api/v3/grid/metric-query" ?
I use this for each node query

meta = requests.get(url = ENDPOINT + "/api/v3/grid/metric-query?query=storagegrid_storage_utilization_metadata_bytes&timeout=120s", headers = headers, verify = False)
usable = requests.get(url = ENDPOINT + "/api/v3/grid/metric-query?query=storagegrid_storage_utilization_usable_space_bytes&timeout=120s", headers = headers, verify = False)
usedec = requests.get(url = ENDPOINT + "/api/v3/grid/metric-query?query=storagegrid_storage_utilization_ec_data_bytes&timeout=120s", headers = headers, verify = False)
sharp egret
#

@last badge
yes, this seems to work!
Thanks

can you just tell us what is the diffrence between:
storagegrid_storage_utilization_data_bytes and
storagegrid_storage_utilization_ec_data_bytes ?

rancid hatch
last badge
#

storagegrid_storage_utilization_data_bytes is the combination of replica and erasurecoding . The storagegrid_storage_utilization_ec_data_bytes is just the erasure coding side