From ab4ba32b074ce6acceb872425a986fa65e199f9d Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 27 Mar 2017 13:53:18 +0200 Subject: [PATCH] [Minor] Fix changes to metric exporter - Reported by: @tleuxner --- src/plugins/lua/metric_exporter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/lua/metric_exporter.lua b/src/plugins/lua/metric_exporter.lua index 5da1cf7ec..107d034da 100644 --- a/src/plugins/lua/metric_exporter.lua +++ b/src/plugins/lua/metric_exporter.lua @@ -112,10 +112,10 @@ local function graphite_push(kwargs) elseif #split == 2 then mvalue = kwargs['stats'][split[1]][split[2]] end - metrics_str:insert(string.format('%s %s %s', mname, mvalue, stamp)) + table.insert(metrics_str, string.format('%s %s %s', mname, mvalue, stamp)) end - metrics_str = metrics_str:concat('\n') + metrics_str = table.concat(metrics_str, '\n') tcp.request({ ev_base = kwargs['ev_base'], @@ -125,7 +125,7 @@ local function graphite_push(kwargs) timeout = settings['timeout'], read = false, data = { - metrics_str, + {metrics_str, '\n'}, }, callback = (function (err) if err then -- 2.39.5