为什么"FileSystemUsage""Microsoft.Web/网站"指标总是返回零? [英] Why does "FileSystemUsage" metric for "Microsoft.Web/sites" always return zero?
问题描述
在回答检索Microsoft Azure应用服务存储配额时,我偶然发现了 Microsoft.Web/sites
资源类型的 FileSystemUsage
指标.根据 文档
> ,此指标应返回应用消耗的文件系统配额的百分比.
.
While answering Retrieve quota for Microsoft Azure App Service Storage, I stumbled upon the FileSystemUsage
metric for Microsoft.Web/sites
resource type. As per the documentation
, this metric should return Percentage of filesystem quota consumed by the app.
.
但是,当我执行 Metrics-List
我的Web应用程序的REST API操作(以及Azure门户的Metrics刀片中),该值始终返回零.我对照Azure订阅中的许多Web应用程序对其进行了检查,对于所有这些应用程序,结果均为零.我很想知道这样做的原因.
However when I execute Metrics - List
REST API operation (and also in the Metrics blade in Azure Portal) for my web app, the value is always returned as zero. I checked it against a number of web apps in my Azure Subscriptions and for all of them the result was zero. I am curious to know the reason for that.
相反,如果我执行 App Service计划-列出用法
REST API操作,它将为我返回正确的值.例如,如果我的应用服务计划为S2,我会收到以下回复:
In contrast, if I execute App Service Plans - List Usages
REST API operation, it returns me the correct value. For example, if my App Service Plan is S2, I get following response back:
{
"unit": "Bytes",
"nextResetTime": "9999-12-31T23:59:59.9999999Z",
"currentValue": 815899648,
"limit": 536870912000,//500 GB (50 GB/instance x max 10 instances)
"name": {
"value": "FileSystemStorage",
"localizedValue": "File System Storage"
}
},
我是否误解了Web应用程序的 FileSystemUsage
?如果有人可以解释该指标的目的,将不胜感激?如果确实有记载,那么API为什么返回零值?
Did I misunderstand FileSystemUsage
for Web Apps? Would appreciate if someone can explain the purpose of this metric? If it is indeed what is documented, then why the API is returning zero value?
推荐答案
This should be the default behavior, please check this doc Understand metrics:
注意
文件系统使用情况"是一项在全球范围内推出的新指标,无数据除非您的应用托管在应用服务环境中,否则不会出现这种情况.
File System Usage is a new metric being rolled out globally, no data is expected unless your app is hosted in an App Service Environment.
因此,当前该指标文件系统使用率</code>仅应在
查看全文