perl plugin¶
| Plugin name | perl |
| Type | binding |
| Callbacks | config, flush, init, log, notification, read, shutdown, write |
| Status | supported |
| Since | 4.0 |
| Copyright | 2007–2009 Sebastian Harl |
| License | MIT License |
| Configuration | collectd.conf(5) |
Description¶
The Perl plugin embeds a Perl interpreter into collectd and exposes the application programming interface (API) to Perl-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. Perl-modules written for the Perl 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 Perl plugin are documented in the collectd-perl(5) manual page.
Synopsis¶
# See "Caveats" below.
<LoadPlugin perl>
Globals true
</LoadPlugin>
<Plugin perl>
IncludeDir "/path/to/perl/plugins"
BaseName "Collectd::Plugins"
EnableDebugger ""
LoadPlugin "FooBar"
<Plugin FooBar>
Foo "Bar"
</Plugin>
</Plugin>
Caveats¶
Globals¶
If using versions 4.9 or 4.10, be sure to load the Perl plugin with the Globals option set to true. Otherwise some Perl module will not work properly or at all. The appropriate configuration for loading the Perl plugin is:
Versions before 4.9 don't support this option; you'll have to compile with global visibility of symbols if you want to use certain Perl modules. Version-5.0 and later will automatically set this flag for the Perl plugin, so the above syntax isn't required but still legal.
Dependencies¶
libperl
See also¶
Configuration¶
Configuration options · from collectd.conf(5)
See this section in the full configuration reference
This plugin embeds a Perl-interpreter into collectd and provides an interface to collectd's plugin system. See collectd-perl(5) for its documentation.