diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-22 18:24:39 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-22 18:24:39 +0000 |
commit | 0daddc29cab716e143d0c037b122774b67bff720 (patch) | |
tree | 885bb27ca09fe235ef5c284898f04ae19add15f0 /src/plugins/lua/clickhouse.lua | |
parent | 5d12d7827f3f526b85ac6da2757242de0f644fc8 (diff) | |
download | rspamd-0daddc29cab716e143d0c037b122774b67bff720.tar.gz rspamd-0daddc29cab716e143d0c037b122774b67bff720.zip |
[Fix] Fix clickhouse exporter
Diffstat (limited to 'src/plugins/lua/clickhouse.lua')
-rw-r--r-- | src/plugins/lua/clickhouse.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua index 84a479b46..aae6f20b7 100644 --- a/src/plugins/lua/clickhouse.lua +++ b/src/plugins/lua/clickhouse.lua @@ -250,12 +250,12 @@ end local function clickhouse_send_data(task) local upstream = settings.upstream:get_upstream_round_robin() - local ip_addr = tostring(upstream:get_addr()) + local ip_addr = upstream:get_addr():to_string(true) local function http_cb(err_message, code, _, _) if code ~= 200 or err_message then - rspamd_logger.errx(task, "cannot send data to clickhouse server %s: %s:%s", - ip_addr, code, err_message) + rspamd_logger.errx(task, "cannot send data to clickhouse server %s: %s", + ip_addr, err_message) upstream:fail() else rspamd_logger.infox(task, "sent %s rows to clickhouse server %s", @@ -688,12 +688,12 @@ if opts then rspamd_config:add_on_load(function(cfg, ev_base, worker) -- XXX: need to call this script for all upstreams local upstream = settings.upstream:get_upstream_round_robin() - local ip_addr = tostring(upstream:get_addr()) + local ip_addr = upstream:get_addr():to_string(true) local function http_cb(err_message, code, _, _) if code ~= 200 or err_message then - rspamd_logger.errx(rspamd_config, "cannot create table in clickhouse server %s: %s:%s", - ip_addr, code, err_message) + rspamd_logger.errx(rspamd_config, "cannot create table in clickhouse server %s: %s", + ip_addr, err_message) upstream:fail() else upstream:ok() |