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

Support for microsoft.resources/subscriptions at Subscription scope #61

Open
gcampbell12 opened this issue Aug 28, 2023 · 0 comments
Open

Comments

@gcampbell12
Copy link

Querying for https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-resources-subscriptions-metrics currently fails due to the default filter passed here

Filter: to.StringPtr(`Microsoft.ResourceId eq '*'`),

This causes azure to throw the following error:

{
  "cost": 0,
  "timespan": "2023-08-28T03:10:27Z/2023-08-28T04:10:27Z",
  "interval": "PT1M",
  "value": [
    {
      "id": "subscriptions/<subid>/providers/Microsoft.Insights/metrics/Traffic",
      "type": "Microsoft.Insights/metrics",
      "name": {
        "value": "Traffic",
        "localizedValue": "Traffic"
      },
      "displayDescription": "Traffic data for all requests to Azure Resource Manager",
      "unit": "Count",
      "timeseries": [],
      "errorMessage": "Metric doesn't have preaggregate defined to be sent to metrics store or cache server which contains requested dimensions and requested sampling types. minMaxRequested:False, percentileRequested:False, DistinctCountColumns: , useExactMatchingPreaggregate:False. Metric:armshoebox47,Requests,Latency, Dimension Names:IsCustomerOriginated|microsoft.resourceid|Microsoft.SubscriptionId, Dimension Filters:[dimensionName:Microsoft.SubscriptionId, dimensionValues:<subid>, isExcludeFilter:False, isRegularExpression:False]|[dimensionName:microsoft.resourceid, dimensionValues:, isExcludeFilter:False, isRegularExpression:False]|[dimensionName:IsCustomerOriginated, dimensionValues:true, isExcludeFilter:False, isRegularExpression:False], OptedInToUseMdmWithoutMetricConfig:False.",
      "errorCode": "InvalidSeries"
    }
  ],
  "namespace": "microsoft.resources/subscriptions",
  "resourceregion": "global"
}

Not sure whats the best option for handling this other than special casing the metric namespace and nulling the filter

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

1 participant