Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite: multiple series with a single command

Tags:

graphite

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?

like image 834
Nova Avatar asked Oct 10 '12 09:10

Nova


People also ask

What is SumSeries?

The SumSeries function is one of the most commonly used in Anodot. It provides the most straightforward way to sum a group of time-series, resulting in a single time-series.

How to access Graphite?

To access Graphite settings, hover your mouse over the Configuration (gear) icon, then click Data Sources, and then click the Graphite data source. The data source name. This is how you refer to the data source in panels and queries. Default data source means that it will be pre-selected for new panels.


1 Answers

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

like image 57
dannyla Avatar answered Oct 15 '22 14:10

dannyla