Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用REST和PowerShell查询ServiceBus度量返回空值_Powershell_Azureservicebus_Servicebus_Azure Eventhub_Azure Servicebus Queues - Fatal编程技术网

使用REST和PowerShell查询ServiceBus度量返回空值

使用REST和PowerShell查询ServiceBus度量返回空值,powershell,azureservicebus,servicebus,azure-eventhub,azure-servicebus-queues,Powershell,Azureservicebus,Servicebus,Azure Eventhub,Azure Servicebus Queues,我正在尝试使用RESTAPI和PowerShell检索Azure服务总线队列/事件集线器的长度和大小等指标 问题1: 我使用下面的代码调用RESTAPI。 虽然它确实返回响应,但值始终为空。 我尝试在ASM和ARM门户中创建queue和eventhub,结果相同 Invoke RestMethod-Method GET-Urihttps://management.core.windows.net/mysubscriberid/services/servicebus/Namespaces/max

我正在尝试使用RESTAPI和PowerShell检索Azure服务总线队列/事件集线器的长度和大小等指标

问题1: 我使用下面的代码调用RESTAPI。 虽然它确实返回响应,但值始终为空。 我尝试在ASM和ARM门户中创建queue和eventhub,结果相同

Invoke RestMethod-Method GET-Urihttps://management.core.windows.net/mysubscriberid/services/servicebus/Namespaces/maxsb2/Queues/maxqueue2/Metrics `
-证书指纹mycertthumbprint`

-标题@{“x-ms-version”=“2015-08-01”;“Content-Type”=“application/json”}
Problem1中的度量端点仅返回度量列表,而不是这些度量的值。要获得值,您需要查询单个度量,如问题2中所示。实际上,这就是我正在做的,只是粘贴错误,如果您查看输出,其值为空。Problem1中的Invoke RestMethod-Method GET-Uri Metrics端点仅返回度量列表,而不是这些度量的值。要获得值,您需要查询单个度量,如问题2中所示。实际上,这就是我正在做的,只是粘贴错误,如果您查看输出,其值为空。调用RestMethod-methodget-Uri