Azure 自定义指示器

问题描述 投票:0回答:1

我有一个心理障碍,无法解决这个问题。 在 Azure Application Insights 中,我有这个自定义表。我正在尝试创建实际工作的索引。该表有一个“事件”列,您可以在其中进行多种类型的交易。我试图得到一个代表实际工作百分比的数字。其中一项交易是“UploadSuccess”。我想要将 UploadSuccess 总金额除以交易总金额除以 100。

我第一次尝试:

let ActualWork = Table
| project Event
| where Event == 'UploadSuccess'
| summarize count();
let AllWork = Table
| project Event
| summarize count();
<here is where I am stuck. How do I use ActualWork and AllWork>

然后我尝试了:

let ActualWork = Table
| project Event
| where Event == 'UploadSuccess'
| summarize count();
Table
| project Event
| evaluate ((ActualWork/count())*100)

AND 
| summarize ((ActualWork/count())*100) //here I cannot parse ActualWork

关于如何解决这个问题有什么想法吗?

azure azure-application-insights kql azure-monitoring
1个回答
0
投票

你可以试试这个:

Table
| project Event
| summarize round(100.0 * countif(Event == 'UploadSuccess') / count() , 2)
© www.soinside.com 2019 - 2024. All rights reserved.