Graphite: multiple series with a single command

萝らか妹 提交于 2019-12-09 05:26:37

问题


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?


回答1:


You have a few options here...

  • Merge the 2 graphs on to the graph via the drag and drop in the dashboard

OR

  • Use the sumSeriesWithWildcards() function

Merge 2 or more wildcard matching

  1. Open your first graph on the dashboard
  2. Open your second graph on the same dashboard
  3. Click and hold the second graph and drag it over the first graph

Use groupByNode() and wildcard matching

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)

This will do the following:

  • Select all all the graphs that match base.foo.bar.positive.* and base.foo.bar.negative.*
  • Sum the data by the node at position 3: positive, negative

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



来源:https://stackoverflow.com/questions/12816337/graphite-multiple-series-with-a-single-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!