<div dir="ltr">Hi,<div><br></div><div>I'm running collectd 5.04 on AWS:</div><div><br></div><div><div>collectd-5.0.4-1.19.amzn1.x86_64</div><div>collectd-java-5.0.4-1.19.amzn1.x86_64</div></div><div><br></div><div>I'm trying to get the java plugin working to monitor tomcat. I have a config file as follows:</div>
<div><br></div><div><div>LoadPlugin java</div><div><br></div><div><Plugin "java"></div><div> JVMARG "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"</div>
<div><br></div><div> LoadPlugin "org.collectd.java.GenericJMX"</div><div> <Plugin "GenericJMX"></div><div># Heap memory usage</div><div><MBean "memory-heap"></div><div>
ObjectName "java.lang:type=Memory"</div><div> InstancePrefix "memory-heap"</div><div> <Value></div><div> Type "jmx_memory"</div><div> Table true</div><div> Attribute "HeapMemoryUsage"</div>
<div> </Value></div><div></MBean></div><div><br></div><div> <Connection></div><div> Host "localhost"</div><div> ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"</div>
<div> Collect "memory_pool"</div><div> </Connection></div><div> </Plugin></div><div></Plugin></div></div><div><br></div><div>The log file says: Cannot find the API class "org.collectd.api.Collectd". Please set the correct class path using 'JVMArg "-Djava.class.path=..."'</div>
<div><br></div><div>But as you can see, I already have this line added. The jar files exist and contain the correct classes:</div><div><br></div><div><div>[root@localhost ~]# rpm -ql collectd-java</div><div>/etc/collectd.d/java.conf</div>
<div>/usr/lib64/collectd/java.so</div><div>/usr/share/collectd/java/collectd-api.jar</div><div>/usr/share/collectd/java/generic-jmx.jar</div></div><div><br></div><div>Can anyone help?</div><div><br></div><div>Thanks,</div>
<div><br></div><div>Dan Scott</div></div>