[collectd] Collectd.pm question

Sebastian Harl sh at tokkee.org
Sat Apr 26 11:52:07 CEST 2008

Hi Ruslan,

On Sat, Apr 26, 2008 at 03:18:21AM +0300, Ruslan Bondarev wrote:
> I grabbed a recent version of collectd and decided to write my own
> perl plugin using collectd-perl. However, Collectd.pm itself produces
> syntax errors, thus making local debug (without hooking to
> collectd-perl) of the perl script impossible.
> # perl -c /usr/lib/perl5/site_perl/5.8.8/Collectd.pm Bareword
> "LOG_ERR" not allowed while "strict subs" in use at
> /usr/lib/perl5/site_perl/5.8.8/Collectd.pm line 122.  ...  Execution
> of /usr/lib/perl5/site_perl/5.8.8/Collectd.pm aborted due to
> compilation errors.
> Is this intended or am I doing something wrong? Please advise, thanks.

You can only use Collectd.pm from inside collectd. That is, you have to
write a plugin which can be loaded by collectd's perl plugin (see
collectd-perl(5) for details and contrib/examples/MyPlugin.pm for an
example). The collectd perl plugin basically is an extended perl
interpreter which provides additional features required by Collectd.pm.
Thus you cannot use the module in stand-alone mode.


Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080426/01d5ec13/attachment.pgp 

More information about the collectd mailing list