MicrosoftDataShareSentSnapshotLog 表的查询

按持续时间列出发送的快照

过去 7 天内按持续时间排序的快照列表。

MicrosoftDataShareSentSnapshotLog
| where TimeGenerated > ago(7d) 
| where StartTime != "" and EndTime  != "" 
| project StartTime , EndTime , DurationSeconds =(todatetime(EndTime)-todatetime(StartTime))/1s , ResourceName = split(_ResourceId,"/accounts/",1) 
| sort by DurationSeconds desc nulls last 

对发送的失败快照进行计数

过去 7 天内失败的快照总数。

MicrosoftDataShareSentSnapshotLog
| where TimeGenerated > ago(7d)  
| where Status == "Failed" 
| summarize count() by _ResourceId 

发送的快照中频繁出现错误

列出过去 7 天内的前 10 个错误。

MicrosoftDataShareSentSnapshotLog 
| where TimeGenerated > ago(7d)  
| where Status == "Failed" 
| summarize count() by _ResourceId, DataSetType// Counting failed logs per datasettype
| top 10 by count_ desc nulls last

每日发送的快照图表

最近快照计数、成功 VS 失败的时间图表。

//Succeeded VS Failed
MicrosoftDataShareSentSnapshotLog 
| where TimeGenerated > ago(30d)  
| summarize count() by bin(TimeGenerated, 1d), Status, _ResourceId // Aggregating by day //Click "Table" to see resource's name.
| render timechart