[collectd] Java plugin - Cannot find the API class "org.collectd.api.Collectd"

Dan Scott danieljamesscott at gmail.com
Wed Sep 18 15:38:16 CEST 2013


Hi,

I'm running collectd 5.04 on AWS:

collectd-5.0.4-1.19.amzn1.x86_64
collectd-java-5.0.4-1.19.amzn1.x86_64

I'm trying to get the java plugin working to monitor tomcat. I have a
config file as follows:

LoadPlugin java

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

        LoadPlugin "org.collectd.java.GenericJMX"
        <Plugin "GenericJMX">
# Heap memory usage
<MBean "memory-heap">
  ObjectName "java.lang:type=Memory"
  InstancePrefix "memory-heap"
  <Value>
    Type "jmx_memory"
    Table true
    Attribute "HeapMemoryUsage"
  </Value>
</MBean>

    <Connection>
      Host "localhost"
      ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
      Collect "memory_pool"
    </Connection>
    </Plugin>
</Plugin>

The log file says: Cannot find the API class "org.collectd.api.Collectd".
Please set the correct class path using 'JVMArg "-Djava.class.path=..."'

But as you can see, I already have this line added. The jar files exist and
contain the correct classes:

[root at localhost ~]# rpm -ql collectd-java
/etc/collectd.d/java.conf
/usr/lib64/collectd/java.so
/usr/share/collectd/java/collectd-api.jar
/usr/share/collectd/java/generic-jmx.jar

Can anyone help?

Thanks,

Dan Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20130918/2ed8ff89/attachment-0001.html>


More information about the collectd mailing list