PureStorage-OpenConnect / pure-fa-openmetrics-exporter

Pure Storage OpenMetrics exporter for FlashArray
Apache License 2.0
20 stars 27 forks source link

`/api/api_version` struct using `version` and not `versions` #157

Closed farseeker closed 1 month ago

farseeker commented 1 month ago

When I attempt to run this against our flash blades, we receive the error

not a valid FlashArray REST API version

I have about 7 arrays to test on, of various ages. On all of our arrays when I query https://[endpoint]/api/api_version I receive the following data:

{"versions":["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.8.1","1.9","1.10","1.11","1.12","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12"]}

This struct is incompatible with with the struct at flasharray_client.go:45 which is defined as

type ApiVersions struct {
    Versions []string `json:"version"`
}

For this to work with our array, this would need to be

type ApiVersions struct {
    Versions []string `json:"versions"`
}

(plursalised). I do not know why our flash blade is spitting out a different struct to what this code is expecting. Perhaps a breaking change in an API somewhere?

farseeker commented 1 month ago

Ugh, never mind. This is the FlashArray repo, not the FlashBlade repo. My apologies.

chrroberts-pure commented 1 month ago

Hi, for FlashBlade, please use our sister exporter

https://github.com/PureStorage-OpenConnect/pure-fb-openmetrics-exporter

chrroberts-pure commented 1 month ago

On the bright side this is a well thought out and formatted issue report. Please report to us if you have any further issues - or if you’d like to meet on a call please email us at pure-observability@purestorage.com