我在EC2上的三个实例上安装了Graphite:
relay1.graphite.prod.example.ec2 cache3.graphite.prod.example.ec2 cache4.graphite.prod.example.ec2 该继电器与一致哈希完美工作。 问题是两个Web服务器没有互相通信,所以我只能看到一个服务器的指标。
我花了很多时间在https://answers.launchpad.net/graphite/+question/114206 ,我无法弄清楚我设置不正确。 我可以从cache3对cache4运行wget,获取数据并在Apache日志中查看。 所以我不认为这是一个防火墙问题。 我试着在remote_storage.py中启用suppressError = False ,并在local_settings.py中打开了DEBUG,但是在Firebug中没有看到任何错误。
cache3 – local_settings.py
CLUSTER_SERVERS = [ 'cache4.graphite.prod.example.ec2', 'localhost' ]
cache4 – local_settings.py
CLUSTER_SERVERS = [ 'cache3.graphite.prod.example.ec2', 'localhost' ]
我也尝试使用IP地址,并没有影响。
我做了一些更多的debugging和修改storage.py直接硬编码我的远程主机:
STORE = Store(settings.DATA_DIRS, remote_hosts=["cache4.graphite.prod.example.ec2", "127.0.0.1"])
这工作。 所以,不知何故,我的CLUSTER_SERVERS值不能从local_settings.py正确拉入。
有什么build议么?
原来local_settings.py的权限过于严格,Apache无法读取它:
-rw------- 1 root root 4006 May 4 13:40 local_settings.py
修复权限到644(而不是600)解决了这个问题。