Open zzbennett opened 7 years ago
Alternatively, rather than installing requests in the root python environment, it could be installed in the path where the signalfx collectd plugin lives, e.g. /opt/collectd-plugins. I just copied the requests library there and that solved all my issues.
I'm trying out the collectd-cloudwatch plugin and it seems like it is just what I need. I've run into a number of frustrating setup pains however, particularly around installing requests, which is the only external dependency (disclaimer: I am not a python developer so I'm kind of stumbling through this)
Some excepts:
Doing
sudo pip install chardet=3.0.4
yields this:So the right version of chardet is installed in the directory
/usr/local/lib/python2.7/site-packages
, however, there is another version installed to/usr/lib/python2.7/dist-packages
which is version 2.0.1.The setup.py script is not loading the correct version because the sys.path is listing dist-packages first. Now, I think I could do sudo easy_install -U chardet=3.0.4 and try to upgrade the version that is in
/usr/lib/python2.7/dist-packages
but I don't know if that will break other python scripts in my system that depend on that specific version of chardet.I ran the setup.py script in a virtualenv to try to get the initial setup working, which worked pretty well until the setup.py script tried to restart collectd.
I saw this error in the collectd.log file:
So whatever path collectd is using to run python doesn't even have requests installed.
Okay so long story short, I think the setup process would be easier and less error prone if users didn't need to fuss with external dependencies and python paths to get this working. This is especially true because this python script and the collectd plugin depend on root's python environment.