Reputation: 5369
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/)
However I cannot get the values to "stack" on top of each other. They are overlapping each other. My example:
The is my graph data:
Graph after using "stacked" - not quite what I was looking for
Upvotes: 6
Views: 4970
Reputation: 1909
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
)
)
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
)
)
Upvotes: 7