【发布时间】:2018-11-01 04:00:28
【问题描述】:
我遇到了以下异常:
异常类型:CloudException,消息:指标类别“AllMetrics” 不支持。
为任何 存储帐户 运行 Azure PowerShell 命令 Set-AzureRmDiagnosticSetting,相同的命令适用于其他资源类型,如 Key Vault、Service Bus、 负载均衡器等
Azure PowerShell 命令:
设置-AzureRmDiagnosticSetting -ResourceId $ResourceId -Enable $true -RetentionInDays 365 -RetentionEnabled $true
异常详情:
Set-AzureRmDiagnosticSetting : Exception type: CloudException, Message: Metric category 'AllMetrics' is not
supported., Code: BadRequest, Status code:BadRequest, Reason phrase: Bad Request
At line:1 char:1
+ Set-AzureRmDiagnosticSetting -ResourceId '/subscriptions/c1ddf901-1db ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmDiagnosticSetting], PSInvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.Diagnostics.SetAzureRmDiagnosticSettingCommand
截图
还尝试使用不同的存储帐户资源 ID 指定参数 -StorageAccountId $StorageAccountIdLogs,仍然得到相同的异常。
【问题讨论】:
标签: azure azure-storage azure-powershell