Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite + Collectd - How to plot memory used percentage for each host?

I have graphite+collectd setup to collect system related metrics. This question concerns with the memory plugin for collectd.

My infra has this format for collecting memory usage data using collectd:

<cluster>.<host>.memory.memory-{buffered,cached,free,used}

I want to plot the percentage of memory used for each host.

So basically, I have to do something like this:

divideSeries(sumSeriesWithWildCards(*.*.memory.memory-{buffered,cached,free},1),sumSeriesWithWildCards(*.*.memory.memory-{buffered,cached,free,used}),1)

But I am not able to do this, as divideSeries wants the divisor metric to return only one metric.

I basically want a single target to monitor all hosts in a cluster.

How can I do this?

like image 636
Sabya Avatar asked May 29 '14 13:05

Sabya


1 Answers

try this one:

asPercent(host.memory.memory-used, sumSeries(host.memory.memory-{used,free,cached,buffered}))

you'll get a graph of memory usage in percents for one hosts. Unfortunately I wasn't able to make it work with wildcards (multiple hosts).

like image 128
Tombart Avatar answered Sep 17 '22 17:09

Tombart