Sorry, but I think you didn't understand my question. For example, I write a 
plugin use python as follows. I want to verify if my plugin would work,
then I run it. It cann't run because collectd can't import, the module is not 
exist.
I search in google, but every people say how to configure python plugin, not 
anywhere to say how to install python plugin dependency.
Below is some python code,error occured at the first line :


import collectd
import socket
from string import maketrans
from time import time
from traceback import format_exc


host = None
port = None
differentiate_values = False
differentiate_values_over_time = False
lowercase_metric_names = False
prefix = None
types = {}
postfix = None
host_separator = "_"
metric_separator = "."
protocol = "tcp"












At 2013-05-17 18:00:01,collectd-requ...@verplant.org wrote:
>Send collectd mailing list submissions to
>       collectd@verplant.org
>
>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
>       collectd-requ...@verplant.org
>
>You can reach the person managing the list at
>       collectd-ow...@verplant.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of collectd digest..."
>
>
>Today's Topics:
>
>   1. Re: collectd Digest, Vol 92, Issue 9 (Sven Trenkel)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Thu, 16 May 2013 17:23:44 +0200
>From: Sven Trenkel <colle...@semidefinite.de>
>To: collectd@verplant.org
>Subject: Re: [collectd] collectd Digest, Vol 92, Issue 9
>Message-ID: <5194fa00.1070...@semidefinite.de>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>On 2013-05-12 14:20, kangqiang wrote:
>> I'm really appreciate for your replying, it is helpful to me.
>> Yes, I tried to import it in interactive interpreter, the
>>
>> backtrace just say "no module named collectd". I can import time, os,system 
>> module, and can print it well.
>> hoping for your reply, thank you.
>
>I'm really confused how this could happen, if there is any kind of error 
>while initializing the collectd Python module then the entire Python 
>plugin of collectd should refuse to continue and get unloaded by 
>collectd so that it could never even launch the interactive interpreter.
>
>So my only idea here would be:
>1. Use the interactive mode in your config, as you have pasted it before.
>2. Log all collectd messages to stdout
>3. Do not load any other modules
>4. Start collectd, try to import the module collectd
>5. Past result here
>
>The very short collectd config do do that looks something like this:
>
>FQDNLookup   true
>LoadPlugin logfile
><Plugin logfile>
>         LogLevel info
>         File STDOUT
>         Timestamp true
></Plugin>
><LoadPlugin python>
>         Globals true
></LoadPlugin>
><Plugin python>
>         ModulePath "/path/to/somewhere/"
>         LogTraces true
>         Interactive true
></Plugin>
>
>
>
>
>------------------------------
>
>_______________________________________________
>collectd mailing list
>collectd@verplant.org
>http://mailman.verplant.org/listinfo/collectd
>
>
>End of collectd Digest, Vol 92, Issue 14
>****************************************
_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to