Forum Discussion

simon_unger's avatar
simon_unger
Novice I
2 years ago

Hi, i am trying to get the amount of storage used of

Hi, i am trying to get the amount of storage used of one/multiple arrays, from pure1. I am looking for the same value as shwon in pure1 UI under Fleet - Appliances. Are historic metrics my only onption here. And if so, which is the correct one and how to i get a "live" value.
  • i wanted to use pure1 to gather data from all our array at once. mainly to reduce the total amount of rest calls i had to do
  • you can poll metrics/history for capacity metric ‘array_total_capacity’
  • provide a epoch start and end time in ms. you can do some calculation here to query each array with the same time.
  • unfortunately, you must provide an array name to perform this. so you’ll have to loop through your /array endpoint or use a predetermined list.
  • if you need specific other values, you can query a simple get against /metrics and it will return the metrics available.
  • for ‘live’, use the closest timestamp for the interval. keep in mind pure1 is updated when receiving phone home log updates, so it will be as close to current as possible based on that transmission.
  • thanks for the suggestion. i did that, but the most recent value i get back is from 24h back, or 86400000 back, as per the min resolution value available. So Its weird to me that pure one seems to be updated multiple times a day, but i only get the value which is 24h old.
  • This is one exampe from a few min. ago. https://api.pure1.purestorage.com/api/1.latest/metrics/history?names='array_unique_space'&resource_ids='XXXXXXXXXXXX'&aggregation='max'&resolution=86400000&start_time=1687183228000&end_time=1687269628000|https://api.pure1.purestorage.com/api/1.latest/metrics/history?names='array_unique_space'[…]86400000&start_time=1687183228000&end_time=1687269628000 the epoch in "end_time" is my current time of execution. and it does not mater how far forward i set the start time, or change the resolution. the most recent values do not match what i get shown in pure1