Forum Discussion
- mboeckelmannNovice Iare you restricted to pure1 query for “live” values?
- simon_ungerNovice Ii 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
- mboeckelmannNovice Iyou can poll metrics/history for capacity metric ‘array_total_capacity’
- mboeckelmannNovice Iprovide a epoch start and end time in ms. you can do some calculation here to query each array with the same time.
- mboeckelmannNovice Iunfortunately, you must provide an array name to perform this. so you’ll have to loop through your /array endpoint or use a predetermined list.
- mboeckelmannNovice Iif you need specific other values, you can query a simple get against /metrics and it will return the metrics available.
- mboeckelmannNovice I‘array_unique_space’ is probably what you would want.
- mboeckelmannNovice Ifor ‘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.
- simon_ungerNovice Ithanks 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.
- simon_ungerNovice IThis 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