[collectd] Send collectd data with different Graphite prefixes
Giovanni Torres
giovanni.torres at gmail.com
Wed Sep 16 01:29:46 CEST 2015
On Tue, Sep 15, 2015 at 6:04 PM Steve Wray <steve at wtfast.com> wrote:
> We are gathering both system performance metrics (eg cpu directly from
> collectd) as well as application performance metrics (eg an application
> sends some of its internal performance metrics to collectd via the statsd
> input).
>
> We'd like these to go into graphite with different prefixes eg the system
> performance metrics should go under eg server.sys. and application metrics
> should go under eg app.statsd.
>
> I've been looking at chains and I'd thought that this should do something
> like what we need:
>
> <LoadPlugin cpu>
> Globals false
> </LoadPlugin>
>
> <LoadPlugin statsd>
> Globals false
> </LoadPlugin>
> <Plugin statsd>
> Host "0.0.0.0"
> Port 8125
> </Plugin>
>
> # This should be the default write, it should get the stats from the cpu
> plugin:
>
> <Plugin write_graphite>
> <Node "collectd_graphite">
> Host "our.graphite.server"
> Port "2003"
> # it goes under server.sys.
> Prefix "server.sys."
> Protocol "tcp"
> </Node>
> </Plugin>
>
> # This should catch writes from statsd and send them to collectd with the
> app.statsd. prefix.
> # It should not get the cpu stats as that doesn't come via statsd
>
> LoadPlugin "match_regex"
> <Chain "PreCache">
> <Rule>
> <Match "regex">
> Plugin "^statsd$"
> </Match>
> <Target "write">
> <Plugin "write_graphite">
> <Node "collectd_graphite">
> Host "our.graphite.server"
> Port "2003"
> Prefix "app.statsd."
> EscapeCharacter "."
> Protocol "tcp"
> </Node>
> </Plugin>
> </Target>
> Target "stop"
> </Rule>
> Target "write"
> </Chain>
>
> Whats actually happening is that the statsd data is being sent to graphite
> with the server.sys. prefix.
>
> Any advice on using Chains would be helpful.
>
What if you use a consistent prefix when sending metrics to statsd, like
"statsd."
Then, use the replace target (e.g.
https://collectd.org/wiki/index.php/Target:Replace) to swap
server.sys.statsd.* to app.statsd.*
Giovanni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20150915/0743dfdd/attachment.html>
More information about the collectd
mailing list