Skip to content

InstancePrefix in <Value> not being used #33

@lajoie

Description

@lajoie

The InstancePrefix configuration directive within the block doesn't seem to be used. Below is my example config and so I expected to see metrics like:

*.cass-test-1.jvm.heap.

and what I got was
*.cass-test-1.jvm.memory-

A quick test of changing the Type shows that the 'memory-' is coming from the type. Maybe the type is mistakenly being added to the metric name instead of the prefix?

LoadPlugin java

<Plugin java>
  JVMARG "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/collectd-fast-jmx-1.0.0.jar"

  LoadPlugin "com.e_gineering.collectd.FastJMX"

  <Plugin FastJMX>
    LogLevel "FINE"
    MaxThreads 256

    <MBean "memory">
      ObjectName "java.lang:type=Memory"

      <Value>
        Attribute "HeapMemoryUsage"
        Type "memory"
        Composite true
        InstancePrefix "heap"
        PluginName "jvm"
      </Value>
      <Value>
        Attribute "NonHeapMemoryUsage"
        Type "memory"
        Composite true
        InstancePrefx "non-heap"
        PluginName "jvm"
      </Value>
    </MBean>

    <Connection "cass-test-1">
      ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi"
      Collect "memory"
    </Connection>

  </Plugin>
</Plugin>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions