本文介绍了石墨:使用单个命令的多个系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在石墨 dashboard 的同一图形中放入两个系列.但是,由于仪表板需要单行命令,所以我找不到不使用通配符的方法.

I would like to put two series in the same graph on the graphite dashboard. However, since the dashboard requires single-line commands I could not find a way that doesn't involve the use of a wildcard.

这是我想在同一张图中的两个系列的示例:

Here's an example of the two series I would like in the same graph:

sum(base.foo.bar.positive.*)
sum(base.foo.bar.negative.*)

我尝试了几个分隔符,但无法使用.有什么想法吗?

I tried several separators but I could not get it to work. Any ideas?

推荐答案

您在这里有一些选择...

You have a few options here...

  • 通过拖放 dashboard
  • 将2个图形合并到图形上
  • Merge the 2 graphs on to the graph via the drag and drop in the dashboard

OR

  • Use the sumSeriesWithWildcards() function

合并2个或更多通配符匹配

  1. 在仪表板上打开第一个图形
  2. 在同一仪表板上打开第二张图
  3. 点击并按住第二张图并将其拖到第一张图上

使用groupByNode()和通配符匹配

这不是很好,并且不会总是起作用,但是您将能够在一行中完成所有操作.

This is not as nice, and will not always work however you will be able to do this all in one line.

sumSeriesWithWildcards(base.foo.bar.{positive,negative}.*, 3)

这将执行以下操作:

  • 选择所有与base.foo.bar.positive.*和base.foo.bar.negative.*匹配的图.
  • 按位置3处的节点对数据求和:

您可能需要阅读以下页面: http://graphite. readthedocs.org/en/1.0/functions.html

You might want to have a read over the following page: http://graphite.readthedocs.org/en/1.0/functions.html

这篇关于石墨:使用单个命令的多个系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 12:45