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
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
)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With