Open ajpogue opened 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
@msyyc can you please take a look at this?
Hi @ajpogue Could you paste your Python code which can reproduce the error? And if convenient, please follow https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.md to give us more detailed log.
Hi @ajpogue, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
This was resolved by adding the previous version of the API ("apiVersion": 2018-01-01,) to the query vs letting it grab the latest version. 1 - specify the api version in this portion of code you are currently using to force using the 2018-01-01 api version. ( please modify based on your code)
resource_metrics = [] for resource in resources: for metric in get_metrics(resource_uri=resource.id, date_start=date_start, date_end=date_end, resource_name=resource.name, interval='PT1M'): resource_metrics.append(metric)
something like this:
resource_metrics = [] for resource in resources: for metric in get_metrics(resource_uri=resource.id, date_start=date_start, date_end=date_end, resource_name=resource.name, interval='PT1M', api_version="2018-01-01"): resource_metrics.append(metric)
2- install the python packages with specifying the previous version using azure-mgmt-monitor==5.0.1 before the api issue is fixed
According to the info, the REST API with 2021-05-01 doesn't work but it works in 2018-01-01. It is not the SDK error but service problem so I will transfer it to swagger repo.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @SameergMS, @dadunl.
Author: | ajpogue |
---|---|
Assignees: | SaurabhSharma-MSFT |
Labels: | `question`, `Monitor`, `Service Attention`, `customer-reported`, `Mgmt`, `needs-team-attention`, `CXP Attention` |
Milestone: | - |
@ajpogue removing cxp attention since service team is already involved.
Describe the bug python queries worked as expected - Using notebook with Databricks, azsdk-python-azure-mgmt-monitor/5.0.1 Python/3.8.10 (Linux-5.4.0-1100-azure-x86_64-with-glibc2.29)
query fails with http 400 bad request error - Using notebook with Databricks, "userAgent": azsdk-python-azure-mgmt-monitor/6.0.0 Python/3.8.10 (Linux-5.4.0-1100-azure-x86_64-with-glibc2.29)
To Reproduce see URLS below
Expected behavior metric data returned.
Additional context Bad one: "PreciseTimeStamp": 2023-03-21T04:00:57.0483802Z, "TaskName": HttpIncomingRequestEndWithClientFailure, "operationName": GET/SUBSCRIPTIONS/RESOURCEGROUPS/PROVIDERS/MICROSOFT.ANALYSISSERVICES/SERVERS/PROVIDERS/MICROSOFT.INSIGHTS/METRICS, "apiVersion": 2021-05-01, "httpMethod": GET, "httpStatusCode": 400, "targetUri": [https://management.azure.com:443/subscriptions/subid/resourceGroups/RG/providers/Microsoft.AnalysisServices/servers/servername/providers/providers/Microsoft.Insights/metrics?timespan=2023-03-20%2f2023-03-21&interval=PT1M&metricnames=qpu_metric%2cmemory_metric%2cMemoryLimitHard%2cQueryPoolJobQueueLength&aggregation=Average&api-version=2021-05-01] "targetResourceProvider": MICROSOFT.INSIGHTS, "targetResourceType": METRICS, "userAgent": azsdk-python-azure-mgmt-monitor/6.0.0 Python/3.8.10 (Linux-5.4.0-1100-azure-x86_64-with-glibc2.29)
Good one: "PreciseTimeStamp": 2023-03-20T04:00:46.8433581Z, "TaskName": HttpIncomingRequestEndWithSuccess, "operationName": GET/SUBSCRIPTIONS/RESOURCEGROUPS/PROVIDERS/MICROSOFT.ANALYSISSERVICES/SERVERS/PROVIDERS/MICROSOFT.INSIGHTS/METRICS, "apiVersion": 2018-01-01, "httpMethod": GET, "httpStatusCode": 200, "targetUri": https://management.azure.com:443/subscriptions/subid/resourceGroups/RG/providers/Microsoft.AnalysisServices/servers/servername/providers/Microsoft.Insights/metrics?timespan=2023-03-19%2f2023-03-20&interval=PT1M&metricnames=qpu_metric%2cmemory_metric%2cMemoryLimitHard%2cQueryPoolJobQueueLength&aggregation=Average&api-version=2018-01-01, "targetResourceProvider": MICROSOFT.INSIGHTS, "targetResourceType": METRICS, "userAgent": azsdk-python-azure-mgmt-monitor/5.0.1 Python/3.8.10 (Linux-5.4.0-1100-azure-x86_64-with-glibc2.29)