简体   繁体   English

(Grafana / Kibana / Elasticsearch)表格按端点显示特定值的计数

[英](Grafana / Kibana / Elasticsearch) Table to display count of specific values by endpoint

I've set up a Grafana table, where I can log/display all the exceptions thrown in a given endpoint.我已经设置了一个 Grafana 表,我可以在其中记录/显示给定端点中抛出的所有异常。

Now the next thing I want to do is to have a counter for each of the exceptions, shown in a graph or table - is that possible?现在我想做的下一件事是为每个异常设置一个计数器,以图表或表格的形式显示——这可能吗? (not having to "hardcode" every possible exception). (不必“硬编码”每一个可能的异常)。

The table I have now looks like this:我现在的表如下所示:

我现在拥有的表格的屏幕截图,显示抛出的异常

As you can see - some of the exceptions are the same.如您所见 - 一些例外情况是相同的。 It could be nice to have an overview, where I can see fx a count of each exception that has been thrown the last 24 hours, making it a great tool to improve the system and prioritize what to work on first.有一个概览可能会很好,我可以在其中看到过去 24 小时内引发的每个异常的计数,使其成为改进系统和优先处理哪些工作的好工具。

Any ideas?有任何想法吗?

If your field with exception is indexed, you can:如果您的异常字段被索引,您可以:

  • aggregate data by this field (group by terms)按此字段聚合数据(按术语分组)

  • get count of every series (metric -> count)获取每个系列的计数(度量 -> 计数)

If your field not indexed, you can't do it*如果你的字段没有被索引,你不能这样做*

表格设置的屏幕截图

by grouping by exception.Message.keyword it will give a nice table showing a count for each exception.通过按 exception.Message.keyword 分组,它将给出一个漂亮的表格,显示每个异常的计数。

Notice that if they are not all showing, then try manipulating/changing the last rubric "Top 10, Min Doc Count.." into the "No limit"-option.请注意,如果它们没有全部显示,请尝试将最后一个量规“Top 10, Min Doc Count..”操作/更改为“无限制”选项。

*answer found here (Reddit) *在这里找到答案(Reddit)

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

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