Question

I am trying to create a graph as show below which was described in blog post(http://matt.aimonetti.net/posts/2013/06/26/practical-guide-to-graphite-monitoring/)

what im looking for

However I cannot get the values to "stack" on top of each other. They are overlapping each other. My example:

My example

The is my graph data:

enter image description here

Graph after using "stacked" - not quite what I was looking for enter image description here

Was it helpful?

Solution

You were fairly close to it. :)

In the Graphite web-app, follow Graph Options -> Line Mode -> Stacked. In case you're rendering using the API, add &areaMode=stacked to your URL.


This is the GUI tweak to achieve what you want. To generate the metrics, do-

asPercent(
      group(
             carbon.agents.ip-10-0-0-111-a.updateOperations,
             carbon.agents.ip-10-0-0-111-a.metricsReceived
      ),
      sumSeries(
             carbon.agents.ip-10-0-0-111-a.updateOperations,
             carbon.agents.ip-10-0-0-111-a.metricsReceived
      )
)

This is how it works-

asPercent takes two arguments- a seriesList and a total. Here, the group(...) part is the former and sumSeries(...) the latter. Graphite compares each metric in the seriesList ( which can be achieved by group() or by using wildcards) with the total and hence calculates percentages.

The good part is that total is an optional and if not sent is assumed to be the total of seriesList. So in essence, your metric is reduced to-

asPercent(
      group(
             carbon.agents.ip-10-0-0-111-a.updateOperations,
             carbon.agents.ip-10-0-0-111-a.metricsReceived
      )
) 

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top