Solved

API use to get Storage Summary like Prism Gas Gauge

  • 10 April 2018
  • 2 replies
  • 2534 views

The Prism dashboard has a "Storage Summary" that in my case says:
187.79TiB free (physical) of 196.48 TiB Below that is a nice gas gauge.

If I GET /cluster it has a pile of neat "usage_stats" like:
code:
"storage.capacity_bytes": "216028288236854",
"storage.logical_usage_bytes": "18208300498944",
"storage.free_bytes": "206432796056886",
"storage_tier.ssd.usage_bytes": "9595477352448",

I want to use the API to get the free and Total storage numbers that
match the Prism dashboard values. Nothing matches the dashboard.

Is there a formula that I can
use on some of the usage_stats to get close?

thanks,
-steve
icon

Best answer by Chandru 11 April 2018, 05:57

@SteveComins The stats are in bytes and Prism displays in Tebibytes not Terabytes (More info https://en.wikipedia.org/wiki/Tebibyte) . To find your total and free capacity you need to divide the storage.capacity_bytes and storage.free_bytes by 1099511627776.
View original

2 replies

Userlevel 3
Badge +13
@SteveComins The stats are in bytes and Prism displays in Tebibytes not Terabytes (More info https://en.wikipedia.org/wiki/Tebibyte) . To find your total and free capacity you need to divide the storage.capacity_bytes and storage.free_bytes by 1099511627776.
Perfect - thanks much, love it when the answer is cake to implement !

Reply