Closed tothf closed 3 years ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
I have provided a fix to issue #29, while for this issue there is not any chance to lower the number of calls to the array API for the volumes, as the minimal combination for gathering all the KPIs is the one that is implemented in the current code. As a reference, I have put below the list of the calls that are made in sequence during a scrape request: the first 29 are just executed once for a given scrape, the last is instead executed in a loop over all the hosts. I wish there was a possibility to further reduce the number of API requests, but the rationale adopted in the current code is to extract all the KPIs minimizing the number of calls to the FlashArray (and FlashBlade).
flasharray.get() flasharray.list_hardware() flasharray.list_messages() flasharray.list_vgroups() flasharray.list_volumes(pending=true) flasharray.list_volumes(protocol_endpoint=True) flasharray.list_volumes(action='monitor') flasharray.list_volumes(action='monitor', mirrored=True) flasharray.list_volumes(action='monitor', latency=True) flasharray.list_volumes(action='monitor', latency=True, mirrored=True) flasharray.list_volumes(action='monitor', size=True) flasharray.list_volumes(action='monitor', size=True, mirrored=True) flasharray.list_volumes(space=True, pending=True) flasharray.list_hosts() flasharray.list_hosts(action='monitor') flasharray.list_hosts(action='monitor', mirrored=True) flasharray.list_hosts(action='monitor', latency=True) flasharray.list_hosts(action='monitor', latency=True, mirrored=True) flasharray.list_hosts(action='monitor', size=True) flasharray.list_hosts(action='monitor', size=True, mirrored=True) flasharray.list_hosts(space=True) flasharray.list_pods(pending=true) flasharray.list_pods(action='monitor') flasharray.list_pods(action='monitor', mirrored=True) flasharray.list_pods(action='monitor', latency=True) flasharray.list_pods(action='monitor', latency=True, mirrored=True) flasharray.list_pods(action='monitor', size=True) flasharray.list_pods(action='monitor', size=True, mirrored=True) flasharray.list_pods(space=True, pending=True) foreach host flasharray.list_host_connections(host)
Since we have FlashArrays with PODs only we have no volume groups on those. I quickly put this fix together. Also noticed that the exporter called the API 6 times to get the same volume metrics. I've reduced this to 1 call and simply handing over the data to the different metric processors. Can be done for another few i think.