用于每个Azure网站实例的指标的API [英] API for metrics per Azure Site instance

查看:71
本文介绍了用于每个Azure网站实例的指标的API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果要转到资源,则可以在Azure的门户中查看每个站点的实例特定指标,选择每个实例的指标(应用程序),然后选择选项卡站点指标,然后单击单个实例(在下面的屏幕快照中以RD00...开头):

In Azure's Portal you can view instance specific metrics per site if you go to a resource, select Metrics per instance (Apps), select the tab Site Metrics and then click an individual instance (starting with RD00... in the screenshot below):

我想使用一些REST API调用获取此数据(每个实例,包括实例名称RD00...).我看过 Azure的资源管理器及其

I'd like to get this data (per instance, including the instance name RD00...) using some REST API call. I've looked at Azure's Resource Manager and their Metrics API, but couldn't find a way to get this data.

是否可能?如果可以,如何/在何处获取此数据?

Is this possible, and, if so, how/where can I get this data?

推荐答案

我已经看过Azure的资源管理器及其Metrics API,但是找不到获取此数据的方法.

I've looked at Azure's Resource Manager and their Metrics API, but couldn't find a way to get this data.

基于

Based on the supported metrics with Azure Monitor of websites, Azure Metrics API only supports total and average type metrics for Azure Web App. We can't get per instance metrics by Azure Metrics API.

如果在Azure门户中打开Web服务器日志记录,则将使用FTP从/LogFiles/http/RawLogs/文件夹中获取详细信息请求数据.您可以下载日志并根据日志生成指标.

If you turn on the Web server logging in Azure portal, you will get the detail request data from /LogFiles/http/RawLogs/ folder using FTP. You could download the log and generate the metrics according the log.

以下是原始日志的记录. ARRAffinity属性将指定使用哪个实例来处理用户请求.

Following is a record of raw logs. The ARRAffinity property will specify which instance is used to handle user request.

2017-04-27 08:51:32 AMOR-WEBAPP-TESTMSBUILD GET /home/index X-ARR-LOG-ID=bbdf4e53-3b96-4884-829c-cf82554abcc7 80 - 167.220.255.28 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.79+Safari/537.36+Edge/14.14393 ARRAffinity=8f8ac6c076f7a9e2132f2eea1ff0fc61836fde1fef8c5525da0e81359003c9e8;+_ga=GA1.3.411824075.1493282866;+_gat=1 - amor-webapp-testmsbuild.azurewebsites.net 200 0 0 2607 1145 10095

ARRAffinity = 8f8ac6c076f7a9e2132f2eea1ff0fc61836fde1fef8c5525da0e81359003c9e8

这篇关于用于每个Azure网站实例的指标的API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆