One thing I just noticed when looking at the python module is the first thing 
it tries to do is this:

import collectd

And when I try and do that manually I get this:

>>> import collectd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named collectd

Is that a module that needs to be installed on my system or is that something 
that is "passed down" when this python module is loaded?

From: <Finn>, "Finn, Dan" <df...@ea.com<mailto:df...@ea.com>>
Date: Friday, February 13, 2015 at 12:44 PM
To: "collectd@verplant.org<mailto:collectd@verplant.org>" 
<collectd@verplant.org<mailto:collectd@verplant.org>>
Subject: [collectd] Issues when trying to use the python plugin for mongo

Hello,

I'm having some problems trying to collect stats from mongo using collectd.  I 
am trying to use this python plugin : 
https://github.com/sebest/collectd-mongodb.  I have it configured in collectd 
and it is actually sending mongo related metrics however they don't seem to be 
correct based on some manual correlation that I've done.  I also get this error 
when starting up collectd with this plugin enabled:

[root@mongo6 ~]# /etc/init.d/collectd restart
Stopping collectd:                                         [  OK  ]
Starting collectd: Parse error in file `/etc/collectd.d/mongodb.py', line 1302 
near `<newline>': syntax error, unexpected EOL
yyparse returned error #1
configfile: Cannot read file `/etc/collectd.d/mongodb.py'.
Parse error in file `/etc/collectd.d/mongodb.pyc', line 1319 near `>': syntax 
error, unexpected CLOSEBRAC
yyparse returned error #1
configfile: Cannot read file `/etc/collectd.d/mongodb.pyc'.
.():():.=.=.=.=[,].=.=.=.=.=.=(,,,,=)::='%-%'%(.,):=(.)=.()[  OK  
]=.=[,].()():=(=.,=.,=)=[.[]]..:.(.,.)=.('')=['']=()


Here is the snipet from my collectd.conf file where I enable the plugin:

<Plugin python>
    ModulePath "/etc/collectd.d/"

    Import "mongodb"
    <Module mongodb>
        Host "127.0.0.1"
        Port 26019
        Database "i19" "local"
    </Module>
</Plugin>

Does anyone have any idea what might be causing that error?  I tried submitting 
a bug report directly on the github page for the project but haven't gotten any 
response in a couple of weeks.  I was about to give up on this when I saw a 
recent posting to this mailing list saying that someone was able to get this 
plugin working.

Any help would be greatly appreciated.

Thanks,
Dan
_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to