Graphite - create a graph with a percentage

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

what im looking for

However, I cannot force the values ​​to "stack" on top of each other. They overlap each other. My example:

My example

My chart details:

enter image description here

The graph after use is β€œstacked” - not quite what I was looking for enter image description here

+6
source share
1 answer

You were pretty close to that. :)

In the Graphite web application, follow Graph Options -> Line Mode -> Stacked . If you use the API, add &areaMode=stacked to your URL.


This is a GUI setup to achieve what you want. To generate 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 ) ) 

Here's how it works -

asPercent takes two arguments: a seriesList and a total . Here the group(...) is the first and sumSeries(...) last. Graphite compares each metric in a seriesList (which can be achieved with group() or with wildcards) with the sum and therefore calculates the percentages.

The good part is that total is optional, and if not sent, it is considered the sum of seriesList . That way, essentially, your score drops 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

+7
source

All Articles