【问题标题】:How to create an Azure Kusto query to group by client OS name only (OS version removed) on App insights?如何在 App 洞察力上创建 Azure Kusto 查询以仅按客户端操作系统名称(已删除操作系统版本)分组?
【发布时间】:2019-02-21 17:14:48
【问题描述】:

我想要什么

按客户端操作系统(无操作系统版本 = 只有操作系统名称)和周分组的页面查看次数。

我有什么 - Kusto 查询:

pageViews
|where timestamp > ago(90d)
|summarize Browser_hits = count() by Date = startofweek(timestamp), client_Browser
|sort by Date   
|render timechart

此查询的问题在于客户端操作系统名称随版本一起提供,并且最终以不同的版本分别分组(见下图)。

更新

这与我需要的很接近,但不适用于任何名称,我只是将其作为示例发布,以帮助理解实际问题。

pageViews
|where timestamp > ago(90d)
|summarize Browser_hits = count() by Date = startofweek(timestamp), BrowserNameTrimed = substring(client_Browser,0,5)
| sort by Date   
| render timechart

通过前面的查询,我得到了这个(一种作弊):

【问题讨论】:

    标签: azure azure-application-insights azure-data-explorer kql


    【解决方案1】:

    这行得通吗? (使用parse运算符将浏览器名称从“浏览器名称+浏览器版本”组合中解析出来):

    pageViews
    | where timestamp > ago(90d)
    | summarize Browser_hits = count() by Date = startofweek(timestamp), client_Browser
    | parse kind=regex client_Browser with client_Browser @" \d+" *
    | render timechart
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-25
      • 1970-01-01
      • 2012-02-05
      • 2014-07-11
      • 2019-11-15
      • 2019-01-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多