From a0cc3e051413038d9bdce2d1411fb1f7e1e744b3 Mon Sep 17 00:00:00 2001 From: thefosk Date: Mon, 17 Apr 2017 18:22:42 -0700 Subject: [PATCH] chore(reports) updating address --- kong/cmd/utils/prefix_handler.lua | 4 ++-- kong/constants.lua | 5 +++-- kong/core/reports.lua | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kong/cmd/utils/prefix_handler.lua b/kong/cmd/utils/prefix_handler.lua index 3f4e98ce16c7..aea99363ad35 100644 --- a/kong/cmd/utils/prefix_handler.lua +++ b/kong/cmd/utils/prefix_handler.lua @@ -168,9 +168,9 @@ local function compile_conf(kong_config, conf_template) tostring = tostring } - if kong_config.anonymous_reports and socket.dns.toip(constants.SYSLOG.ADDRESS) then + if kong_config.anonymous_reports and socket.dns.toip(constants.REPORTS.ADDRESS) then compile_env["syslog_reports"] = fmt("error_log syslog:server=%s:%d error;", - constants.SYSLOG.ADDRESS, constants.SYSLOG.PORT) + constants.REPORTS.ADDRESS, constants.REPORTS.SYSLOG_PORT) end if kong_config.nginx_optimizations then local infos, err = gather_system_infos() diff --git a/kong/constants.lua b/kong/constants.lua index 3c7375452436..a66cc7d42536 100644 --- a/kong/constants.lua +++ b/kong/constants.lua @@ -62,9 +62,10 @@ return { "year" } }, - SYSLOG = { + REPORTS = { ADDRESS = "kong-hf.mashape.com", - PORT = 61828 + SYSLOG_PORT = 61828, + STATS_PORT = 61829 }, CACHE = { CLUSTER = "cluster" diff --git a/kong/core/reports.lua b/kong/core/reports.lua index d9a887e477ce..6e4df07e5f66 100644 --- a/kong/core/reports.lua +++ b/kong/core/reports.lua @@ -61,8 +61,8 @@ local function send_report(signal_type, t, host, port) end t = t or {} - host = host or constants.SYSLOG.ADDRESS - port = port or constants.SYSLOG.PORT + host = host or constants.REPORTS.ADDRESS + port = port or constants.REPORTS.STATS_PORT -- add signal type to data