Good Morning. As I have not received any good "workaround" to my "problem", I've made a patch to rename Plugin name on each <file> section of the tail plugin configuration ( so anybody can reorganize the metrics across the metrics tree).
I hope you can enjoy it. 2013/11/6 Toni Moreno <[email protected]> > 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: > > > <server_name>/<product>/<product-instance>/<type>-<typeinstance> > > > where product can be: "system" (for os), "apache", "weblogic", > "websphere", "oracle", etc. > > By exemple > > serverpro01/system/df/XXXXXX > serverpro01/system/cpu/XXXXXX > serverpro01/system/memory/XXXXXX > serverpro01/apache/<apache-www-mysite-com-80>/XXXXXX > serverpro01/apache/<apache-www-othersite-com-81>/XXXXXX > > > > > > > We have achieved it by replacing "plugin" names by "<product>/<plugin>" > in the PreCacheChain Rules: > > > by example: > > > PreCacheChain "ReName" > <Chain "ReName"> > <Rule "rename_processes"> > <Target "replace"> > Plugin "\\<processes\\>" "system/processes" > </Target> > </Rule> > > <Rule "rename_disk"> > <Target "replace"> > Plugin "\\<disk\\>" "system/disk" > </Target> > </Rule> > > <Rule "rename_cpu"> > <Target "replace"> > Plugin "\\<cpu\\>" "system/cpu" > </Target> > </Rule> > .. > .. > </Chain> > > > > > The problem comes when I would like to use one plugin ( by example tail) > to add metrics below any "product" , > > by example: > > > 1.- Parsing /var/log/messages we would like to add metrics below "system" > > > serverpro01/system/errors/<metric-name> > > > 2.- Parsing /var/log/httpd/{access/error}-www-mysite-80.log we would like > add metrics below an apache instance > > > serverpro01/apache/<apache-www-othersite-com-81>/<metric-name> > > > 3.- Parsing /var/log/httpd/{access/error}-access-www-mysite-81.log we > would like add metrics below an other apache instance: > > serverpro01/apache/<apache-www-othersite-com-81>/<metric-name> > > > 4.- Parsing /oracle/app/oracle/diag/rdbms/PROD/PROD/trace/alert_PROD.log > we would like to add metrics below an oracle instance > > serverpro01/oracle/<oracle-db_1>/<metric-name> > > > 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 > </Target> > </Rule> > > > > > How can do that? > > Any help would be appreciated !! > > Thanks a lot!! > > > -- > > Att > > Toni Moreno > > 699706656 > > > > *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* > -- Att Toni Moreno 699706656 *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*
collectd-5.4.0-tail-add-renamePluginAs.patch
Description: Binary data
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
