你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

对 ResourceManagementPublicAccessLogs 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

按 IP 地址对请求数进行分组

获取从某个 IP 地址访问资源的请求数。

//List the IP addresses and number of calls
ResourceManagementPublicAccessLogs
| where Category == "PublicAccessLogs"
| summarize count() by CallerIpAddress 

触发的操作数

统计发出的请求数。

// Count the number of operations.
ResourceManagementPublicAccessLogs
| where Category == "PublicAccessLogs"
| summarize count() by CorrelationId 

基于目标 URI 的调用

绘制基于目标 URI 的调用数的图表。

// Chart the number of calls based on the target URI.
ResourceManagementPublicAccessLogs
| where Category == "PublicAccessLogs"
| summarize count() by Uri, bin(TimeGenerated, 1m)
| render columnchart with (kind=stacked) 

基于操作名称的调用

基于操作名称统计发出的请求数。

// List the operations and their number of calls from the public network
ResourceManagementPublicAccessLogs
| where Category == "PublicAccessLogs"
| summarize count() by OperationName
| order by count_

基于用户的调用

基于对象标识符统计发出的请求数。

// List the object identifiers and number of calls from each over the public network
ResourceManagementPublicAccessLogs
| where Category == "PublicAccessLogs"
| summarize count() by ObjectIdentifier
| order by count_