Open sasagawayou opened 7 years ago
Could you check if there are multi versions of collectd in your system? For example: /sbin/collectd, /opt/collectd/....
Thank you fo replay! I checked it, But I found collectd is only /usr/sbin/collectd ...
[ec2-user@10-0-0-5 ~]$ sudo find / -name "collectd"
/usr/include/collectd #directory
/usr/lib64/collectd #directory
/usr/share/collectd #directory
/usr/sbin/collectd #use command
/etc/rc.d/init.d/collectd #sysV init program
/var/lib/collectd #directory
And share for my OS version.
[ec2-user@10-0-0-5 src]$ uname -a
Linux ip-10-0-0-5 4.4.44-39.55.amzn1.x86_64 #1 SMP Mon Jan 30 18:15:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I suggest you reinstall the collectd, and check if it works without this plugin
Looks like the dependent library has problem. could you run "easy_install -U --quiet requests" to check the result?
Hi, I resolved it, I checked python version. Before run setup.py.
[ec2-user@10-0-0-5 src]$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib64/python2.7 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/share/man/man1/python.1.gz
After run it.
[ec2-user@10-0-0-5 src]$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python2.6 /usr/lib/python2.7 /usr/lib/python2.6 /usr/lib64/python2.7 /usr/lib64/python2.6 /usr/local/lib/python2.7 /usr/local/lib/python2.6 /usr/include/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
I thought python 2.6 was used in setup.py. So I used python-pip to install requests into the 2.6 library.
[ec2-user@10-0-0-5 src]$ pip -V
pip 6.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
[ec2-user@10-0-0-5 src]$ python-pip -V
pip 6.1.1 from /usr/lib/python2.6/dist-packages (python 2.6)
[ec2-user@10-0-0-5 src]$ ls -la /usr/local/lib/python2.6/site-packages/
total 20
drwxr-xr-x 4 root root 4096 Apr 9 22:36 .
drwxr-xr-x 3 root root 4096 Apr 9 22:14 ..
-rw-r--r-- 1 root root 119 Sep 2 2016 README
[ec2-user@10-0-0-5 src]$ sudo python-pip install requests
You are using pip version 6.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting requests
Using cached requests-2.13.0-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.13.0
After that I successfully terminated setup.py and confirmed that collectd worked.
Do you know why setup.py uses python 2.6? Please tell me if you knew.
Thank you for your helpful. Best regards. Yo
In setup.py, it just uses the easy_install to install the dependency. I guess python2.6 is your default python interpretor.
I have the same issue, [2019-04-01 20:32:16] [error] python plugin: Error importing module "cloudwatch_writer". [2019-04-01 20:32:16] [error] Unhandled python exception in importing module: ImportError: No module named cloudwatch_writer After, changing the ownership to collectd ls -al /opt/collectd-plugins/ total 56 drw-r--r--. 3 collectd collectd 116 Apr 1 20:28 . drwxr-xr-x. 7 root root 109 Apr 1 20:11 .. drwxrwxrwx. 4 collectd collectd 128 Apr 1 20:28 cloudwatch -rwxrwxrwx. 1 collectd collectd 1120 Apr 1 20:28 cloudwatch_writer.py -rwxrwxrwx. 1 collectd collectd 1611 Apr 1 20:28 cloudwatch_writer.pyc -rwxrwxrwx. 1 collectd collectd 1 Apr 1 20:28 init.py -rwxrwxrwx. 1 collectd collectd 42620 Apr 1 20:28 setup.py I am facing this, error on collectd user If i Change it to root it working as expected!
Hi,
Thank you for making great plugins. But I have a problem right now. The collectd-cloudwatch stopped working, After I updated collectd. Please tell me how to complete this properly.
First I installed yum install -y collectd, And I run to setup.py. It's worked. But I tried to upgrade collectd because I wanted to get disk data. When I implemented it, I got an error like the one below.
So I read collectd.log
I thought whether the requests library does not exist. But it seems to exist.
I would like to know how to solve this problem. Incidentally, the collectd currently installed is as follows. (i tried version 5.5/5.6/5.7, all version happen same problem.)
Thank you for your helpful. Best regards. Yo