graphite webapp并不显示所有碳缓存过程的数据

时间:2014-05-17 13:32:42

标签: graphite

我在1个碳中继实例后面运行4个碳缓存实例。下面是我的carbon.conf。

[cache:1]
        LINE_RECEIVER_PORT = 2103
        PICKLE_RECEIVER_PORT = 2104
        CACHE_QUERY_PORT = 7102
        STORAGE_DIR = /graphite_data/01
        LOCAL_DATA_DIR = /graphite_data/01

        [cache:2]
        LINE_RECEIVER_PORT = 2203
        PICKLE_RECEIVER_PORT = 2204
        CACHE_QUERY_PORT = 7202
        STORAGE_DIR = /graphite_data/02
        LOCAL_DATA_DIR = /graphite_data/02

        [cache:3]
        LINE_RECEIVER_PORT = 2303
        PICKLE_RECEIVER_PORT = 2304
        CACHE_QUERY_PORT = 7302
        STORAGE_DIR = /graphite_data/03
        LOCAL_DATA_DIR = /graphite_data/03

        [cache:4]
        LINE_RECEIVER_PORT = 2403
        PICKLE_RECEIVER_PORT = 2404
        CACHE_QUERY_PORT = 7402
        STORAGE_DIR = /graphite_data/04
        LOCAL_DATA_DIR = /graphite_data/04

我已经配置了以下配置的碳继电器

    LINE_RECEIVER_INTERFACE = 0.0.0.0
    LINE_RECEIVER_PORT = 2003
    PICKLE_RECEIVER_INTERFACE = 0.0.0.0
    PICKLE_RECEIVER_PORT = 2004
    RELAY_METHOD = consistent-hashing

 .
    REPLICATION_FACTOR = 1
    DESTINATIONS=127.0.0.1:2104:1,127.0.0.1:2204:2,127.0.0.1:2304:3,127.0.0.1:2404:4

我已使用以下配置配置了我的石墨webapp,以从所有碳缓存过程中获取数据

    STANDARD_DIRS = ['/graphite_data/01',
                     '/graphite_data/02',
                     '/graphite_data/03',
                     '/graphite_data/04']
    # You *should* use 127.0.0.1 here in most cases
    CARBONLINK_HOSTS = ["127.0.0.1:7102:1", "127.0.0.1:7202:2", "127.0.0.1:7302:3","127.0.0.1:7402:4"]

配置完成后,我开始将带有example-client.py的数据推送到我的碳中继过程。我可以看到继电器正在将数据推向碳缓存过程。

**[root@poc-graphite graphite]# ls /graphite_data/02/system/loadavg_5min.wsp 
/graphite_data/02/system/loadavg_5min.wsp
[root@poc-graphite graphite]# ls /graphite_data/03/system/loadavg_1min.wsp 
/graphite_data/03/system/loadavg_1min.wsp
[root@poc-graphite graphite]# ls /graphite_data/04/system/loadavg_15min.wsp 
/graphite_data/04/system/loadavg_15min.wsp**

但我无法在我的网络应用中看到此指标。配置是否有问题。enter image description here

1 个答案:

答案 0 :(得分:0)

您应该使用blow命令检查扭曲插件的路径:

$python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

如果结果中存在路径" /usr/local/lib/python2.7/dist-packages" ,请将其删除:

sudo rm -rf /usr/local/lib/python2.7/dist-packages/twiste*

然后

sudo service carbon-cache stop      ## wait a few seconds here
sudo service carbon-cache start