计算百分比石墨/grafana(缺少分子)

发布于 2025-02-09 21:20:36 字数 466 浏览 1 评论 0原文

我有三个系列#A,#B,#C,用于通过标准仪表中的标签获得百分比,

假设我每个时间序列都有两个标签 (1)颜色=红色,蓝色,绿色 (2)etc = foo,bar

我想要颜色的百分比foo

  • 系列#a具有颜色过滤器,应用摘要(),并且应用groupbytags(color)
  • 系列#B具有颜色的过滤器,一个过滤器“ etc = foo”,应用程序总结(),并且应用groupBytags(color)
  • #c是#b aspercent(#a)

没有etc = foo for foo for for for for for for for for for for for

我遇到的问题是我的数据有时在发生时 。我遇到了一个错误,因为它不能与#B中的组与#A匹配,

我该如何解决此问题,因此#B中缺少的groubbytags将显示为0%

I have three series #A, #B, #C which are used to get a percent by tags in a Bar Gauge

Assume I have two tags in each time-series
(1) color = red, blue, green
(2) etc = foo, bar

I want percent foo by color

  • Series #A has a filter for color, applies summarize(), and applies groupByTags(color)
  • Series #B has a filter for color, a filter "etc=foo", applies summarize(), and applies groupByTags(color)
  • Series #C is #B asPercent(#A)

The issue I have is my data sometimes has no etc=foo for a tag

When this occurs, I get an error since it cannot match the groups in #B with #A

How can I resolve this so the missing groubByTags in #B would show as 0%

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷离° 2025-02-16 21:20:36

这是通过制作一个新的#C系列#A来解决的,该系列由0缩放

,然后将另一个临时#D系列组成#B和#C

#e#d aspercent(#A)

This was solved by making a new interim #C series of #A, which is scaled by 0

Then another interim #D series which groups #B and #C

The #E does the #D asPercent(#A)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文