Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot be able to get Metric List #156

Open
mashirali opened this issue Dec 2, 2024 · 1 comment
Open

Cannot be able to get Metric List #156

mashirali opened this issue Dec 2, 2024 · 1 comment

Comments

@mashirali
Copy link

I cannot be able to get a List of Metrics to be fetch via Python SDK.

This is the reference code i am following.
https://github.com/Azure-Samples/azure-samples-python-management/blob/main/samples/monitor/manage_metric_list.py

When running this code i am getting an error

File "/getRMetricsInfo.py", line 50, in
main()
File "/getRMetricsInfo.py", line 33, in main
result = monitor_client.metrics.list(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 105, in wrapper_use_tracer
return func(*args, **kwargs)

/lib/python3.11/site-packages/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py", line 218, in list
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Not Implemented'

@ChenxiJiang333
Copy link
Contributor

ChenxiJiang333 commented Dec 16, 2024

Hi @mashirali, it must be an error message in the response content, could you share it as well?

For now, I can only guess you're trying to get the UsedCapacity of a storage account, and by the reference , this metric does not support any dimension, so you should not pass the parameter filter with any value to send a valid request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants