小编zhu*_*es3的帖子

使用始终返回 0 的 Kusto 查询语言返回十进制值

我有一个 Kusto 查询,用于查询 Application Insights。目标是获取 5 分钟桶中失败的请求数 / 并将其除以同一 5 分钟桶中的请求总数。我最终将构建一个警报,以便在该百分比大于某个值时触发。但是,我似乎无法正确查询。

在下面的示例中,我对特定时间戳进行了硬编码,以确保遇到一些失败。

这是查询:

let fn = "APP_NAME";
requests
| where success == "False" and cloud_RoleName == fn
| summarize failed=sum(itemCount) by bin(timestamp, 5m)
| where timestamp == "2021-05-17T20:20:00Z"
| join (
    requests
    | where cloud_RoleName == fn
    | summarize reqs=sum(itemCount) by bin(timestamp, 5m)
    | where timestamp == "2021-05-17T20:20:00Z"
  ) on timestamp
| project timestamp, failed, reqs
| extend p=round(failed/reqs, 2)
Run Code Online (Sandbox Code Playgroud)

目前它返回:

timestamp [UTC]             |p  |failed  |reqs
5/17/2021, 8:20:00.000 PM   0 …
Run Code Online (Sandbox Code Playgroud)

azure-application-insights kql

3
推荐指数
2
解决办法
7561
查看次数

使用 Windows Powershell 自动对 Azure 作为服务主体进行身份验证

我需要使用 Powershell 来完成一些自动化的 Jenkins 工作。为了完成这项工作,我需要以非交互方式验证服务主体的身份。

通过 Azure CLI,可以使用以下命令以非交互方式完成此操作:

az login --service-principal -u "$client_id" -p "$client_secret" -t "$tenant_id"
Run Code Online (Sandbox Code Playgroud)

然而,Connect-AzAccount事实证明,使用 Powershell 的 cmdlet 来完成此任务非常困难。是否有办法使用 Powershell cmdlet 实现与上述相同的结果?这里描述的所有选项似乎都是交互式的。

任何帮助将不胜感激。

azure azure-powershell

1
推荐指数
1
解决办法
4789
查看次数

需要帮助:计算机科学 101 HW/JAVA

我针对标题中的问题编写了代码,似乎遇到了一些问题。谁能给我一些关于我做错了什么的见解或提示。尤其是代码的“if...else”部分。

这是问题#9。如果您单击该链接,它将显示问题的打印输出。 http://s21.postimg.org/nl2tmf5tj/Screen_Shot_2013_09_21_at_6_44_46_PM.png

这是我的代码:

import java.util.*;
public class Ch3Ex9 {
/**
 * This method asks user for an x,y coordinates of a point, then returns the
 * distance to the origin and which quadrant the point is in.
 */
public static void main(String[] args)
{
    double xCoord; //x Coordinant initialized to 3
    double yCoord; //y Coordinant initalized to 4
    double hypo; //hypotenuse

    //declare an instance of Scanner to read the datastream from the keyboard
    Scanner keyboard = new Scanner(System.in);

    //get …
Run Code Online (Sandbox Code Playgroud)

javascript java netbeans boolean hypotenuse

-2
推荐指数
1
解决办法
222
查看次数