0

I'm trying to connect RabbitMQ to Graphite(0.9.9) using https://github.com/somic/graphite-rabbitmq However, I'm not entirely sure which directory in Graphite the graphite-rabbitmq files should be placed.

When I run carbon-agent-rabbitm1.py I get

Failed to import the graphite package. Please verify that this package
was properly installed and that your PYTHONPATH environment variable
includes the directory in which it is installed.

For example, you may need to run the following command:

export PYTHONPATH="/home/myusername/lib/python/:$PYTHONPATH"

Help would be very much appreciated

Andrew Lynch
  • 1,297
  • 3
  • 14
  • 25

2 Answers2

0

The convention with python modules, you can just put the downloaded files in an arbitrary temp directory, cd into that directory, and run:

python setup.py install

The standard distutils package will do the work of making sure everything gets to the right place.

You may also want to download pip which will manage the process of downloading and installing these packages for you, in which case you can then just type:

pip install graphite-web

But aside from all that, you really can put the files anywhere, so long as you add the directory to an environment variable called PYTHONPATH, just like the error message you quoted says.

tangentstorm
  • 7,183
  • 2
  • 29
  • 38
0

Unless you've got a specific reason for using the scripts in that github repo, I wouldn't as they appear to be about 3 years old and graphite now has support for RabbitMQ by way of the Twisted Python AMQP library (txamqp), which makes those scripts completely unnecessary.

Dave Wongillies
  • 293
  • 2
  • 5