计算百分比石墨/grafana(缺少分子)
我有三个系列#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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是通过制作一个新的#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)