[collectd] Filter chains and GenericJMX plugin. Help Needed

Josh Behrends jbehrends at gmail.com
Fri Jun 22 22:52:33 CEST 2012


Hello,

I'm looking for some help!  I'm using Collectd 5.1.0 to collect JMX metrics
using the GenericJMX plugin and then sending the metrics over to Graphite.
  The issue I'm having is I need to rename the metric "Type" that's being
sent to graphite.  The format Collectd is currently sending:
 <MachineName>.GenericJMX.<InstanceName>.<Type>.<TypeInstance>  The "Type"
can change between JMX attribute being collected so metric storage in
Graphite can get messy.  So I'd like to take the "Type" and just rename it
to something friendly vs gauge,counter,ect..

I've attempted to use collectd filter chains without any luck.  Each time
I've attempted to use the replace target to replace the Type name I get the
following error:

-Filter subsystem: Failed to create a replace target.
-Target `replace': The `Type' configuration option is not understood and
will be ignored.
-Target `replace': You need to set at lease one of `Host', `Plugin',
`PluginInstance', `Type', or `TypeInstance'.

I'm guessing this is just a matter of me not quiet understanding how filter
chains work.  Any help or examples would be very much appreciated!  Below
is an example of what I'm trying to do:

LoadPlugin "match_regex"
LoadPlugin "target_replace"
 <Chain "PostCache">
   <Rule "replace_type">
     <Match "regex">
       Plugin "^GenericJMX$"
       Type "^gauge$"
     </Match>
        <Target "replace">
          Type "gauge" "test"
        </Target>
     Target "stop"
   </Rule>
   Target "write"
 </Chain>


Thanks!
-- 
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120622/74a5f1ae/attachment.html>


More information about the collectd mailing list