有谁知道如何使用 Azure 资源管理器(Powershell 或 JSON)在 Azure Web 应用程序上设置以下诊断设置。
使用 .json 我只能找到这些设置
"requestTracingEnabled": true, /* Failed request tracing, aka 'freb' */
"httpLoggingEnabled": true, /* IIS logs (aka Web server logging) */
"logsDirectorySizeLimit": 40, /* 40 MB limit for IIS logs */
"detailedErrorLoggingEnabled": true, /* Detailed error messages */
这将打开 Web 服务器日志记录到文件系统,但不打开应用程序日志记录或 blob 存储。
对于 Powershell,此命令似乎仅适用于 ASM,因为它找不到为其提供的非经典存储帐户
Enable-AzureWebsiteApplicationDiagnostic
任何帮助,将不胜感激。我们目前使用的是 Azure Powershell 0.9.8
Regards
The Azure Resource Manager (ARM) template json
根据上面的屏幕截图配置应用程序日志(Blob)和Web服务器日志记录(存储)的部分如下所示:
{
"apiVersion": "2015-08-01",
"name": "logs",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties": {
"applicationLogs": {
"azureBlobStorage": {
"level": "Information",
"sasUrl": "<Your Azure Blob Storage Account SAS Url>",
"retentionInDays": null
}
},
"httpLogs": {
"azureBlobStorage": {
"sasUrl": "<Your Azure Blob Storage Account SAS Url>",
"retentionInDays": null,
"enabled": true
}
},
"failedRequestsTracing": {
"enabled": true
},
"detailedErrorMessages": {
"enabled": true
}
}
}
参考:AzureWebsitesSamples/ARMTemplates/WebAppManyFeatures.json https://github.com/davidebbo/AzureWebsitesSamples/blob/60f7ffa4aac8f461f47388492c4df76834a8eec2/ARMTemplates/WebAppManyFeatures.json#L109-L135
希望这能回答您的问题并帮助解决您的问题。
如果您需要进一步的帮助或说明,请告诉我。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)