clickhouse 不能从 zookeeper 中加载 graphite 配置
发布于 6 个月前 作者 wayhome 409 次浏览 来自 问答

在 zookeeper 中配置如下:

(CONNECTED) /> get /clickhouse/config-overrides/graphite
<host>carbon-relay</host>
<port>24000</port>
<timeout>0.1</timeout>
<interval>5</interval>
<root_path>adclickhouse</root_path>
<metrics>true</metrics>
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>

config.xml 中配置如下:

<graphite from_zk="/clickhouse/config-overrides/graphite"/>

/etc/clickhouse-server/config-preprocessed.xml 渲染的结果是:

    <graphite>
<host>carbon-relay</host>
<port>24000</port>
<timeout>0.1</timeout>
<interval>5</interval>
<root_path>adclickhouse</root_path>
<metrics>true</metrics>
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>
</graphite>

看起来渲染的结果没有什么不对。但是配置不生效,重启 clickhouse 后 /var/log/clickhouse-server/clickhouse-server.err.log 出现如下错误提示:

<Warning> Application: Fail to write to Graphite localhost:42000. e.what() = Connection refused, e.message() = 127.0.0.1:42000

回到顶部