From collectd Wiki
Revision as of 17:53, 1 May 2010 by Octo (talk | contribs) (Dependencies)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Python plugin
Type: binding
Callbacks: config, flush, init, log, notification, read, shutdown, write
Status: supported
First version: 4.9
Copyright: 2009 Sven Trenkel
License: MIT license
Manpage: collectd-python(5)
List of Plugins


The Python plugin embeds a Python interpreter into collectd and exposes the application programming interface (API) to Python-scripts. This allows to write own plugins in the popular scripting language, which are then loaded and executed by the daemon without the need to start a new process and interpreter every few seconds. Python-modules written for the Python 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 python section of the collectd.conf(5) manual page for an in-depth description of the plugin's configuration. Most aspects of the Python plugin are documented in the collectd-python(5) manual page.


<LoadPlugin python>
  Globals true
# ...
<Plugin python>
  ModulePath "/path/to/your/python/modules"
  LogTraces true
  Interactive true
  Import "spam"
  <Module spam>
    spam "wonderful" "lovely"


  • Python ≧ 2.3

See also