collectd-elasticsearch icon indicating copy to clipboard operation
collectd-elasticsearch copied to clipboard

Module name clashing

Open ptbrowne opened this issue 11 years ago • 8 comments
trafficstars

Hi,

I have just run into a very hard to debug problem. After adding elasticsearch.py to my config, I had the error

python plugin: Found a configuration for the "elasticsearch" plugin, but the plugin isn't loaded or didn't register a configuration callback.

It was because I had already installed the ElasticSearch python client globally and so collectd was loading the wrong module. Sure, this is a newbie mistake and I should have used a virtualenv, but I guess maybe renaming elasticsearch.py to elasticsearch_collectd.py could perhaps save some users some headaches ;-)

Thanks !

ptbrowne avatar Sep 30 '14 08:09 ptbrowne

+1

timbunce avatar Oct 28 '14 19:10 timbunce

+1

pdaukintis avatar Nov 14 '14 10:11 pdaukintis

+1

johnarnold avatar Jan 06 '15 00:01 johnarnold

This is caused because there is another python module named "elasticsearch" in your default PYTHONPATH. The work around is to rename the collectd plugin's python file from elasticsearch.py -> elasticsearch_collectd.py then edit your config file and change: Import "elasticsearch" -> Import "elasticsearch_collectd" <Module "elasticsearch"> -> <Module "elasticsearch_collectd">

tedoc2000 avatar Feb 26 '15 20:02 tedoc2000

Thanks for the workaround @tedoc2000. Sure would be nice if the next release of collectd-elasticsearch could avoid the need for the workaround.

timbunce avatar Feb 26 '15 21:02 timbunce

Thank you @tedoc2000 & @ptbrowne, was very helpful !

ddes avatar Aug 05 '15 13:08 ddes

Hello, i don't understand. Config Elasticsearch Plugin that make collectd send to Elas or receivce data from Elas? And I want to collect data from collectd by using Graylog, any suggestions for this problem?

manhdinh avatar Dec 14 '15 08:12 manhdinh

I had the same issue. I think this because I installed python-elasticsearch from elasticsearch upstream python-elasticsearch: Installed: 2.0.0 Candidate: 2.0.0 Version table: *** 2.0.0 0 500 http://packages.elastic.co/curator/3/debian/ stable/main amd64 Packages 100 /var/lib/dpkg/status

rgevaert avatar Jan 13 '16 14:01 rgevaert