[collectd] generating composite metrics
Tom Throckmorton
throck at gmail.com
Tue Jul 1 15:14:57 CEST 2014
On Fri, Jun 27, 2014 at 1:48 AM, Marc Fournier <marc.fournier at camptocamp.com
> wrote:
> Hello,
>
> Excerpts from Gerardo Herzig's message of 2014-06-25 18:14:10 +0200:
> > Hi all. Im wondering if it is possible to generate a metric as a
> > calculation between others.
> >
> > Example I: Know the rate between the "used memory" and the "total
> > memory". Example II: Know the rate between "In use" apache threads
> > against "total" apache threads.
>
> As a side note, the master branch has a patch which allows the memory
> plugin to emit percentages instead of absolute values. Maybe this could
> solve example 1 in a way ?
>
> > I know how to make a graph as this sort of calculations, but i also
> > need to generate an alert when, say, 75% of the apache's threads are
> > in use, so the graphical solutions does not cover all my needs.
> >
> > So i guess the correct solution is to generate my own .rrd files
> > according to existing .rrd files. I just dont have any idea how.
>
> I like using riemann for this sort of use-cases (http://riemann.io).
> Basically, you just use collectd to collect metrics from your systems
> and send them to a riemann server using the write_riemann plugin. Then
> do the calculations/aggregations/correlations (and optionnally, the
> alerting based on the result) in riemann.
>
+1
You can get a similar result by sending the data to graphite, (preferably)
using the write_graphite plugin, at which point you can query it based on
combinations of the data + a variety of supported functions [1]. No native
alerting there, but monitoring the data externally is fairly trivial, since
it's just exposed via a simple URL API [2].
The major advantage to using something external to process the data using
either of these techniques is that you can also make that comparison over
arbitrary sets of metrics (e.g. you want to know the result across your
entire web tier, vs. just for a single node), and you don't need to
calculate/spawn new rrd's in order to do so.
1. https://graphite.readthedocs.org/en/1.0/functions.html
2. https://graphite.readthedocs.org/en/1.0/url-api.html
cheers,
-tt
>
> If you're tied to having the resulting values in RRD files (which
> riemann doesn't know about), you can run riemann embedded in collectd
> using the java language binding plugin. This way you can do the filering
> and calculations you want using riemann, and have the results passed
> down to collectd's rrdtool/rrdcached plugin. Search for "collmann" on
> github for the details.
>
> Marc
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20140701/77492856/attachment.html>
More information about the collectd
mailing list