From collectd Wiki
Revision as of 14:57, 8 December 2009 by Octo (talk | contribs) (Created initial page based on Plugin:Perl.)

(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: in development
First version: 4.9
Copyright: 2009 Sven Trenkel
License: MIT license
Manpage: collectd-python(5)
List of Plugins


The Python plugin embeds a Perl 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 perl 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"


  • 2.3 ≦ Python < 3