我正在试图找到命令的成功率(例如调用)。我已经设置了标志成功的场景标记,并收集了数据。现在,我正在使用Kusto查询创建一个仪表板,该仪表板在触发命令时测量成功率。
我试图使用百分位数来测量在一段时间内使用的命令的成功率,如下所示。
Table
| where Table_Name == "call_command" and Table_Step == "CommandReceived"
| parse Table_MetaData with * "command = " command: string "," *
| where command == "call"
| summarize percentiles(command, 5, 50, 95) by Event_Time当“识别错误”发生时,上面的查询抛出一个错误。另外,这是找到命令成功率的正确方法吗?
更新:
接续命令o/p :
call_command CommandReceived OK null null 1453 null [command = call,id = b444,retryAttempt = 0] [null] [null] 不成功命令o/p :
call_command STOP ERROR INVALID_VALUE Failed to execute command: call, id: b444, status code: 0, error code: INVALID_VALUE, error details: . 556 [command = call,id = b444,retryAttempt = 0] [null] [null]Table name - call_command
Table_step - CommandReceived/STOP
Table_Metadata - [command = call,id = b444,retryAttempt = 0]
Table_status - OK/ERROR发布于 2021-06-08 10:25:02
百分位数要求第一个参数为数值/bool/timespan/datetime,字符串参数无效。第一步似乎是提取调用是否成功,一旦有了这样的列,就可以计算出它的百分位数。下面是一个类似于用例的示例:
let Table = datatable(Event_Time:datetime, Table_MetaData:string) [datetime(2021-05-01),"call_command CommandReceived OK null null 1453 null [command = call,id = b444,retryAttempt = 0] [null] [null] "
,datetime(2021-05-01),"call_command CommandReceived OK null null 1453 null [command = call,id = b444,retryAttempt = 0] [null] [null] "
,datetime(2021-05-01),"call_command STOP ERROR INVALID_VALUE Failed to execute command: call, id: b444, status code: 0, error code: INVALID_VALUE, error details: . 556 [command = call,id = b444,retryAttempt = 0] [null] [null]"]
| extend CommandStatus = split(Table_MetaData, " ")[2]
| extend Success = iif(CommandStatus == "OK", true, false)
| parse Table_MetaData with * "command = " command: string "," *
| where command == "call"
| summarize percentiles(Success, 5, 50, 95) by bin(Event_Time,1d);
Tablehttps://stackoverflow.com/questions/67878823
复制相似问题