[collectd] How to reorganize metric tree in a "collectd -> graphite" platform

Toni Moreno toni.moreno at gmail.com
Tue Nov 5 15:49:24 CET 2013

Good Morning .

We have plans to test different tools to get performance data for a lot of
servers, and we would like to use collectd and graphite to do it.

The main goal of this test is to be able to reorganize the metric tree in
graphite by servername and after "product"

We wish this kind of tree:


where product can be: "system" (for os), "apache", "weblogic", "websphere",
"oracle", etc.

By exemple


We have achieved it  by replacing "plugin" names by "<poroduct>/<plugin>"
 in the  PreCacheChain Rules:

by example:

PreCacheChain "ReName"
<Chain "ReName">
   <Rule "rename_processes">
     <Target "replace">
        Plugin  "\\<processes\\>" "system/processes"

   <Rule "rename_disk">
     <Target "replace">
        Plugin  "\\<disk\\>" "system/disk"

   <Rule "rename_cpu">
     <Target "replace">
        Plugin  "\\<cpu\\>" "system/cpu"

You can see the results in the attached picture ( with
 SeparateInstances=true in the write_graphite configuration)

The problem comes when I would like to use one plugin ( by example tail) to
add metrics over any "product" ,

by example:

1.- Parsing /var/log/messages we would like to add metrigs over "system"


2.- Parsing /var/log/httpd/{access/error}-www-mysite-80.log  we would like
add metrics below an apache instance


3.- Parsing /var/log/httpd/{access/error}-access-www-mysite-81.log we would
like add metrics below an other apache instance:


4.-  Parsing /oracle/app/oracle/diag/rdbms/PROD/PROD/trace/alert_PROD.log
we would like to add metrics below an oracle instance


I've tried with PreCache and PostCache Chains but I have not found any way
to do Replace  with memory like other regex tools  does

 <Rule "rename_tail">
    <Target "replace">
      Plugin  "\\<tail\\>" ""                         <--doesn't work
      PluginInstance "\\<apache_*(.*)*>\\" "apache/\1"  <--doesn't work

How can do that?

Any help would be appreciated !!

Thanks a lot!!



Toni Moreno


*Si no quieres perderte en el olvido tan pronto como estés muerto y
corrompido, *

*escribe cosas dignas de leerse, o haz cosas dignas de escribirse.*

*Benjamin Franklin*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20131105/3df09e73/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd_graphite_tree.jpg
Type: image/jpeg
Size: 21585 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20131105/3df09e73/attachment-0001.jpg>

More information about the collectd mailing list