0

当我Get-AzureRmMetricDefinition在有效的 resourceId 上使用时,我没有得到任何结果。

Get-AzureRmMetricDefinition -ResourceId /subscriptions/{SUB_ID}/resourceGroups/{GroupName}/providers/Microsoft.ServiceBus/namespaces/{Namespace}/subscriptions/{SubId}/resourceGroups/{GroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{ScaleSetName}/subscriptions/{SubId}/resourceGroups/{GroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{ScaleSetName}/virtualMachines/0

我已验证在 VM 模板中选择了诊断扩展。这是 VM0 信息中的扩展详细信息: Id : /subscriptions/{SubId}/resourceGroups/{GroupName}/providers/Microsoft.Compute/virtualMachines/{ScaleSetName}_0/extensions/VMDiagnosticsVmExt_vmNodeType0Name Name : VMDiagnosticsVmExt_vmNodeType0Name Type : Microsoft.Compute/virtualMachines/extensions Location : westus Publisher : Microsoft.Azure.Diagnostics VirtualMachineExtensionType : IaaSDiagnostics TypeHandlerVersion : 1.5 AutoUpgradeMinorVersion : True Settings : {"WadCfg":{"DiagnosticMonitorConfiguration":{"overallQuotaInMB":"50000","EtwProviders":{"EtwEventSourceProviderConfiguration":[{"provider":"Microsoft-ServiceFa bric-Actors","scheduledTransferKeywordFilter":"1","scheduledTransferPeriod":"PT5M","DefaultEvents":{"eventDestination":"ServiceFabricReliableActorEventTable"}},{"provider":"Microsoft-ServiceF abric-Services","scheduledTransferPeriod":"PT5M","DefaultEvents":{"eventDestination":"ServiceFabricReliableServiceEventTable"}}],"EtwManifestProviderConfiguration":[{"provider":"cbd93bc2-71e5 -4566-b3a7-595d8eeca6e8","scheduledTransferLogLevelFilter":"Information","scheduledTransferKeywordFilter":"4611686018427387904","scheduledTransferPeriod":"PT5M","DefaultEvents":{"eventDestina tion":"ServiceFabricSystemEventTable"}}]}}},"xmlCfg":"...","storageAccount":"j3vk3vnhlxaccyharmq6phsa"} ProvisioningState : Succeeded

问题:为什么我无法从订阅中的任何项目中获取指标,我可以采取哪些其他步骤来查找问题?

4

2 回答 2

0

来自 Microsoft 的确认,至少目前,Service Bus 不支持此命令。您可以改为通过 REST API 查询 SB 指标,如下所述: https ://msdn.microsoft.com/en-us/library/azure/dn163586.aspx 。

于 2016-08-29T21:15:54.583 回答
0

对于虚拟机规模集,由于存在可用于规模集的监视诊断,因此您肯定不会获得规模集的任何指标。

仅当为该特定资源启用诊断时,任何资源的适用指标才可用。如上所述,截至今天,虚拟机规模集不支持诊断,因此即使您提供了规模集的有效资源 ID,您也不会获得任何适用指标的列表。

希望这可以帮助!

于 2016-09-16T11:12:10.500 回答