diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-03-27 13:53:18 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-03-27 13:53:18 +0200 |
commit | ab4ba32b074ce6acceb872425a986fa65e199f9d (patch) | |
tree | 64b77718dea90d0ce586f9093bcef9a2388ccb06 | |
parent | f07448bca867cf128203cec945d1838ed0998e75 (diff) | |
download | rspamd-ab4ba32b074ce6acceb872425a986fa65e199f9d.tar.gz rspamd-ab4ba32b074ce6acceb872425a986fa65e199f9d.zip |
[Minor] Fix changes to metric exporter
- Reported by: @tleuxner
-rw-r--r-- | src/plugins/lua/metric_exporter.lua | 6 |
1 files 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 |