我想做,
https://example.com/dir01/?query=apple¶m=1https://example.com/dir01/?query=apple¶m=1https://example.com/dir01/?query=lemon+juice¶m=1https://example.com/dir01/?query=lemon+juice¶m=0https://example.com/dir01/?query=tasteful+grape+wine¶m=1applelemon+juicetasteful+grape+winehttps://aka.ms/AIAnalyticsDemo
我认为extract或parseurl(url)应该是有用的.我尝试了后者,parseurl(url)但不知道如何将"查询参数"提取为一列.
pageViews
| where timestamp > ago(1d)
| extend parsed_url=parseurl(url)
| summarize count() by tostring(parsed_url)
| render barchart
Run Code Online (Sandbox Code Playgroud)
url
http://aiconnect2.cloudapp.net/FabrikamProd/parsed_url
{"Scheme":"http","Host":"aiconnect2.cloudapp.net","Port":"","Path":"/FabrikamProd/","Username":"","Password":"","Query Parameters":{},"Fragment":""}在Azure门户的“我的应用程序见解/日志”视图中,我可以这样查询应用程序数据:
app('my-app-name').traces
该app功能在Azure Monitor query中的app()表达式文章中进行了描述。
Kusto.Explorer不了解该app()功能,这似乎是因为它是Azure Monitor中的“ 其他”运算符之一而引起的。
如何使用Kusto.Explorer查询我的App Insights /日志?我不能使用cluster它,因为它是Azure Monitor不支持的功能之一。
azure azure-application-insights azure-log-analytics kusto azure-data-explorer
我需要为Azure日志分析编写Kusto查询,以查找在字段中具有相同值(相同的错误代码)的连续事件。我们基本上需要确定请求是否连续两次失败。请求失败,一个成功而一个失败的情况将不返回。
我想从c#app从Kusto DB中检索数据,任何人都可以帮助我.我有关于编写Kusto查询的知识,但我需要一些帮助来从Azure托管的Azure Kusto数据库中提取数据.
我尝试了以下代码,但它不起作用:
var client = Kusto.Data.Net.Client.KustoClientFactory.CreateCslQueryProvider("https://help.kusto.windows.net/Samples;Fed=true");
var reader = client.ExecuteQuery("MyTable | count");
// Read the first row from reader -- it's 0'th column is the count of records in MyTable
// Don't forget to dispose of reader when done.
Run Code Online (Sandbox Code Playgroud) 因此,我是Kusto的新手,我试图在kusto查询中获取过去21天的最小和最大日期,我想投影这些最小和最大日期。
如何修改此简单查询,以获取过去21天的最小日期和最大日期?
customEvents
| where timestamp >= ago(21d)
| project timestamp
Run Code Online (Sandbox Code Playgroud) 输入以下内容:
let t1 = datatable(id:string, col1:string, col2:string)
[
'1', 'col1_1', 'col2_1',
'2', 'col1_2', 'col2_2',
'3', 'col1_3', 'col2_3',
'4', 'col1_4', 'col2_4',
'1', 'col1_1', 'col2_11',
];
t1
| distinct id, col1
Run Code Online (Sandbox Code Playgroud)
我需要一个查询,该查询将仅选择“ id”字段中具有唯一值的行。我了解有两种可能的输出:
输出1:
'1', 'col1_1', 'col2_1',
'2', 'col1_2', 'col2_2',
'3', 'col1_3', 'col2_3',
'4', 'col1_4', 'col2_4',
Run Code Online (Sandbox Code Playgroud)
输出2:
'2', 'col1_2', 'col2_2',
'3', 'col1_3', 'col2_3',
'4', 'col1_4', 'col2_4',
'1', 'col1_11', 'col2_11',
Run Code Online (Sandbox Code Playgroud)