Skip to content

Wrong resource group referred reported as Not Found #7

Open
@p9139010

Description

@p9139010

Need to check the script collect-azure-disk-information:

Though the resource (disk) exists the script is looking up on a random Resource Group and reported as failure.

--example:
Line |
37 | $metrics = Get-AzMetric | ~~~~~~~~~~~~~~ | Exception type: ErrorResponseException, Message: Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code 'NotFound' at Microsoft.Azure.Management.Monitor.MetricsOperations.ListWithHttpMessagesAsync(String resourceUri, ODataQuery1 odataQuery, String timespan, Nullable1 interval, String metricnames, String aggregation, Nullable1 top, String orderby, Nullable1 resultType, String metricnamespace, Dictionary2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.Management.Monitor.MetricsOperationsExtensions.ListAsync(IMetricsOperations operations, String resourceUri, ODataQuery1 odataQuery, String timespan, Nullable1 interval, String metricnames, String aggregation, Nullable1 top, String orderby, Nullable1 resultType, String metricnamespace, CancellationToken cancellationToken)
at Microsoft.Azure.Management.Monitor.MetricsOperationsExtensions.List(IMetricsOperations operations, String resourceUri, ODataQuery1 odataQuery, String timespan, Nullable1 interval, String metricnames, String aggregation, Nullable1 top, String orderby, Nullable1 resultType, String metricnamespace)
at Microsoft.Azure.Commands.Insights.Metrics.GetAzureRmMetricCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason phrase: Null
Get-AzDisk:
Line |
14 | … $diskSKU = Get-AzDisk -ResourceGroupName $vm.ResourceGroupName -Disk …
|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions