From collectd Wiki
Revision as of 15:30, 17 April 2009 by Octo (talk | contribs) (Added the "Infobox Plugin" template.)

Jump to: navigation, search
Java plugin
Type: binding
Status: in development
First version: 4.7
Copyright: 2009 Florian Forster
2008 Justo Alonso Achaques
License: GPLv2
Manpage: collectd.conf(5)
List of Plugins


The Java plugin embeds a Java virtual machine (JVM) into collectd and exposes the application programming interface (API) to Java programs. This allows to write own plugins in the popular language, which are then loaded and executed by the daemon without the need to start a new process and JVM every few seconds. Java classes written for the Java plugin are therefore more powerful and efficient than scripts executed by the Exec plugin.

This plugin is a generic plugin, i.e. it cannot work without configuration, because there is no reasonable default behavior. Please read the Plugin perl section of the collectd.conf(5) manual page for an in-depth description of the plugin's configuration. The programming interface is documented in detail in the collectd-java(5) manual page.


<Plugin "java">
  JVMArg "-verbose:jni"
  JVMArg "-Djava.class.path=/opt/collectd/lib/collectd/bindings/java"
  LoadPlugin ""
  <Plugin "">
    # To be parsed by the plugin


  • Java Native Interface (JNI) / libjvm