hi,
it seems it's not about config. When I write python plugin, i first need to
import collectd. I tried to import it in ipython, it throws exception.
anyway, my python collectd config as follows:
<Plugin python>
ModulePath "/opt/monitor/libvirt_memory.py"
LogTraces true
Interactive true
# Import "spam"
#
# <Module spam>
# spam "wonderful" "lovely"
# </Module>
</Plugin>
At 2013-05-08 18:00:01,[email protected] wrote:
>Send collectd mailing list submissions to
> [email protected]
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.verplant.org/listinfo/collectd
>or, via email, send a message with subject or body 'help' to
> [email protected]
>
>You can reach the person managing the list at
> [email protected]
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of collectd digest..."
>
>
>Today's Topics:
>
> 1. collectd python plugin (kangqiang)
> 2. Re: collectd python plugin (Sven Trenkel)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Wed, 8 May 2013 15:25:57 +0800 (CST)
>From: kangqiang <[email protected]>
>To: [email protected]
>Subject: [collectd] collectd python plugin
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset="gbk"
>
>hi guys, i am writing a python plugin, when i try to do this:
>import collectd
>it show me no module named collectd.
>i have installed collectd 5.2.0 using
>http://ppa.launchpad.net/raravena80/collectd5/ubuntu precise main
>can anybody help me? i am really confusing
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
><http://mailman.verplant.org/pipermail/collectd/attachments/20130508/dff98848/attachment-0001.html>
>
>------------------------------
>
>Message: 2
>Date: Wed, 08 May 2013 11:20:44 +0200
>From: Sven Trenkel <[email protected]>
>To: [email protected]
>Subject: Re: [collectd] collectd python plugin
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>On 2013-05-08 09:25, kangqiang wrote:
>
>> hi guys, i am writing a python plugin, when i try to do this:
>> import collectd
>> it show me no module named collectd.
>
>Did you load the Python module in collectd? If so, did it print anything
>in the logs? If you can't find anything useful there, paste the Python
>related part of your collectd config here so we can take a look at it.
>
>
>
>
>------------------------------
>
>_______________________________________________
>collectd mailing list
>[email protected]
>http://mailman.verplant.org/listinfo/collectd
>
>
>End of collectd Digest, Vol 92, Issue 4
>***************************************
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd