让RabbitMQ和Graphite连接

时间:2012-06-26 10:55:55

标签: python django rabbitmq graphite

我正在尝试使用https://github.com/somic/graphite-rabbitmq将RabbitMQ连接到Graphite(0.9.9) 但是,我不完全确定Graphite中的哪个目录应该放置graphite-rabbitmq文件。

当我运行carbon-agent-rabbitm1.py时,我得到了

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"

非常感谢帮助

2 个答案:

答案 0 :(得分:0)

使用python模块的约定,您可以将下载的文件放在任意临时目录中,cd进入该目录,然后运行:

python setup.py install

标准distutils包将完成确保一切都到达正确位置的工作。

您可能还想下载pip来管理下载和安装这些软件包的过程,在这种情况下,您只需输入:

pip install graphite-web

但除此之外,只要将目录添加到名为PYTHONPATH的环境变量中,就可以将文件放在任何位置,就像您引用的错误消息一样。

答案 1 :(得分:0)

除非你有一个特定的理由在github repo中使用脚本,否则我不会因为它们看起来大约3岁而且且现在通过Twisted Python AMQP库支持RabbitMQ(txamqp) ),这使得这些脚本完全没必要。