[collectd] problem with importing collectd python module
pawel.akonom at vnomic.com
Sat Feb 6 14:54:39 CET 2016
The problem is with collectd python module - python script can't load it. It can't find it in default python modules path. Is collectd python module included in collectd source code? If so please write with file it is because I couldn't find it. If it's not included in collectd source code from where can I get it? In collectd python plugin documentation there is example with "import collectd" which is loading collectd python module.
From: Joshua J. Kugler <joshua at azariah.com>
Sent: Saturday, February 6, 2016 1:13 AM
To: collectd at verplant.org
Cc: Pawel Akonom; Derek Palma
Subject: Re: [collectd] problem with importing collectd python module
On Friday, February 05, 2016 19:39:50 Pawel Akonom wrote:
> The first line of mongodb.py plugin is:
> "import collectd" and the plugin can't load it. When I run python shell and
> try to import collectd manually I get:
> [root at cisco_aci_dev184 ~]# python
> Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import collectd
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: No module named collectd
Can you clarify what you mean by "the plugin can't load it?" Do you can an
error? Or is the Python plugin not finding the mongodb.py plugin?
Per the wiki page here: https://collectd.org/wiki/index.php/Plugin:Python you
will need to provide a path to the module you're trying load. Can you post
your collectd config?
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua at azariah.com - Jabber: pedahzur at gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A
More information about the collectd