【问题标题】:Azure Application insights -- availability percentage based on ResultCodeAzure 应用程序洞察——基于 ResultCode 的可用性百分比
【发布时间】:2020-07-02 00:25:43
【问题描述】:

我正在尝试根据 ResultCode 获取可用性百分比,以下是我的查询,有人可以帮助找到正确的吗?

requests
| where cloud_RoleName contains "somename"
| where client_Type != "Browser" and name !contains "GET"
| where resultCode !in (400,401,403,404,500,502)
| summarize count=sum(itemCount)
| project Percentage= (todouble((count) * 100 / todouble(count))

【问题讨论】:

  • 你好,当有人评论/回答你的问题时,你最好给出一些回应,比如解决方案是否有效或接受它作为答案。

标签: azure-application-insights dashboard azure-monitoring availability


【解决方案1】:
Requests
| where cloud_RoleName contains "somename"
| where client_Type != "Browser" and name !contains "GET"
| summarize total=count()
| extend a = "a"
| join 
(   Requests
    | where cloud_RoleName contains "somename"
    | where client_Type != "Browser" and name !contains "GET"
    | where resultCode !in (400,401,403,404,500,502)
    | summarize success=count()
    | extend a = "a"
) on a
| project Percentage = success*100/todouble(total)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-15
    • 2023-04-08
    相关资源
    最近更新 更多