我正在尝试使用以下rest API获取vm的度量值:
https://management.azure.com/subscriptions/aac11d2f-f03b-454e-9f65-4eb00795f964/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/ubuntu/metrics?api-version=2014-04-01&$filter=%28name.value%20eq%20%27\Memory\Availableand%20timeGrain%20eq%20duration%27PT1M%27%20and%20startTime%20eq%202016-02-18T20%3A26%3A00.0000000Z%20and%20endTime%20eq%202016-03-23T21%3A26%3A00.0000000Z
但是它给了我一个不好的请求URL。有谁能帮我解决这个问题吗。
发布于 2016-10-06 15:37:31
最后得到的API列出了rest API的azure资源指标共享链接:
https://msdn.microsoft.com/en-us/library/azure/mt743622.aspx
发布于 2016-03-28 03:32:39
如果您想要从Azure Platform获取VM指标,您可以遵循这些文档。
使用Azure Storage服务来存储您的指标,并使用storage SDK或Rest API获取指标,无论您使用的是经典模式还是资源组模式。
请参考官方文档,了解如何在Azure Portal上启用诊断设置:https://azure.microsoft.com/en-in/blog/windows-azure-virtual-machine-monitoring-with-wad-extension/,以及如何使用Azure storage REST API (https://msdn.microsoft.com/en-us/library/azure/dd179355.aspx)和SDK (https://github.com/Azure?utf8=%E2%9C%93&query=storage )
从您的描述来看,您似乎使用了Application Insight服务来显示您在Azure上的指标。实际上,根据我的经验,Application Insight服务正在预览中,它是为Azure平台上的实时应用程序而设计的,例如Web应用程序、Android应用程序等等。
https://stackoverflow.com/questions/36177124
复制