Reputation: 12631
I am trying to find the success rate of a command (e.g call). I have scenario markers in place that marks the success, and the data is collected. Now I am using the Kusto queries to create a dashboard that measures the success rate when the command is triggered.
I was trying to use percentiles to measure the success rate of the command that was being used over a period of time as below.
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
The above query throws an error as "recognition error" occurred. Also, is this the right way to find the success rate of the command.
Updated :
Successfull command o/p :
call_command CommandReceived OK null null 1453 null [command = call,id = b444,retryAttempt = 0] [null] [null]
Unsuccessfull command 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
Upvotes: 0
Views: 766
Reputation: 7618
Percentiles require that the first argument is numeric/bool/timespan/datetime, a string argument is not valid. It seems that the first step is to extract whether a call was successful, once you have such a column you can calculate the percentiles for it. Here is an example similar to your use-case:
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);
Table
Upvotes: 1