Closed brianmowens closed 3 years ago
I'm afraid I don't know enough about these APIs to know what the issue might be. Have you tried bumping the api version inside the code of the exporter?
After running the exporter in a debugger, I found that the API versions were being returned correctly and the latest version was accurately being picked up. This lead me to a formatting error in my resource_id. I had not properly updated my config file between tests, and while I thought I was using the correct resource_id string of "/resource/GROUP_NAME/...", I was actually using the incorrect resource_id that still lead with '/subscriptions/SUBSCRIPTION_ID/'.
After correcting the resource_id, this error was resolved.
Perhaps an improvement would be to add in an error log line in the findBy that checks if the resourceType actually exists in the APIVersion map returned by the extractAPIVersions function.
Thanks for the assistance!
I'm currently facing an issue where the azure-exporter is unable to find the API version for Virtual Machine Scalesets. Perhaps there should be a way to manually specify the API version to use?
Error message:
azure-exporter | 2021/06/03 21:22:32 Failed to get resource info: No api version found for type: RESOURCE_GROUP/providers/virtualMachineScaleSets
My config (minus credentials section) is:
I've also tried this without specifying the metric_namespace, and the same error is returned.
.\azure_metrics_exporter.exe --list.definitions successfuly returns:
.\azure-metrics-exporter.exe --list.namespaces successfully returns: