简体   繁体   English

如何使用 AZURE KQL 编写查询以获取自定义 output 作为结果?

[英]How to write a query to get the custom output as a result using AZURE KQL?

Issue what we are facing: We are currently facing an exception which blocks our flow.发布我们所面临的问题:我们目前正面临一个阻碍我们流程的异常。 We are trying to understand why this issue is occurring too many times using log analytics in azure.我们正在尝试使用 azure 中的日志分析来了解为什么此问题会发生太多次。 Using this approach its a time taking and finally there is no conclusion.使用这种方法需要时间,最后没有结论。

We heard that the same can achieve using KQL.我们听说使用 KQL 也可以达到同样的效果。 I am a beginner in this KQL and felt that its not a straight forward to get the following expected output.我是这个 KQL 的初学者,并且觉得获得以下预期的 output 并不是一件容易的事。

I need your help to get the expected output using AZURE KQL this way we can find and take a quick decision.我需要您的帮助才能使用 AZURE KQL 获得预期的 output,这样我们可以找到并快速做出决定。

Expected Output: Exception -Error Message -Failed at which method -Failed in which page -Failed at which line -In Which Module -Type of Exception -At what time -Before and after this exception -Get count of this exception how many times it occured.预期 Output:异常 - 错误消息 - 在哪个方法失败 - 在哪个页面失败 - 在哪一行失败 - 在哪个模块 - 异常类型 - 在什么时间 - 在此异常之前和之后 - 获取此异常的计数多少次发生。

Firstly, please know that it is the same Kusto Query Language (KQL) that powers querying Log Analytics on Azure.首先,请知道在 Azure 上查询 Log Analytics 的功能是相同的 Kusto 查询语言 (KQL)。 So your ask of "using KQL instead of Log Analytics" is pretty confusing.因此,您对“使用 KQL 而不是 Log Analytics”的要求非常令人困惑。

Log Analytics is the primary tool in the Azure portal for editing log queries and interactively analyzing their results. Log Analytics 是 Azure 门户中用于编辑日志查询和交互式分析其结果的主要工具。 It also allows you to write simple queries without directly working with the query language.它还允许您编写简单的查询,而无需直接使用查询语言。 If you haven't used Log Analytics before, start with the Log Analytics Tutorial so you understand the tool that you'll use with the other tutorials and samples.如果您以前没有使用过 Log Analytics,请从Log Analytics 教程开始,以便了解您将在其他教程和示例中使用的工具。

As far as KQL is concerned, here are some great resources that can help you get started:就 KQL 而言,这里有一些很好的资源可以帮助您入门:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM