【问题标题】:graphite webapp doesn't show data from all carbon cache process石墨 webapp 不显示来自所有碳缓存进程的数据
【发布时间】:2014-05-17 13:32:42
【问题描述】:

我在 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 将数据推送到我的碳中继进程。我可以看到中继正在将数据推送到 carbon-cache 进程。

**[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**

但我无法在我的 web 应用中看到这些指标。是不是配置有问题

【问题讨论】:

  • 嗨,您找到解决方案了吗?

标签: graphite


【解决方案1】:

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

$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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多