diff options
author | Andrew Lewis <nerf@judo.za.org> | 2024-07-08 16:05:52 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2024-07-08 16:05:52 +0200 |
commit | 2f9eebdf46e4c4bf7c2cb06724c1697431ce73bb (patch) | |
tree | 72b1e266b5b88782b66c52eae4ddc2bbcb7f6da0 /src/plugins | |
parent | 213c8ef3232ceada4e70fba6e3c4e72362cb5f15 (diff) | |
download | rspamd-2f9eebdf46e4c4bf7c2cb06724c1697431ce73bb.tar.gz rspamd-2f9eebdf46e4c4bf7c2cb06724c1697431ce73bb.zip |
[Fix] metric_exporter: avoid sending `nil` in metric values
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/metric_exporter.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/metric_exporter.lua b/src/plugins/lua/metric_exporter.lua index 75885516c..3de87c157 100644 --- a/src/plugins/lua/metric_exporter.lua +++ b/src/plugins/lua/metric_exporter.lua @@ -117,7 +117,7 @@ local function graphite_push(kwargs) elseif #split == 2 then mvalue = kwargs['stats'][split[1]][split[2]] end - table.insert(metrics_str, string.format('%s %s %s', mname, mvalue, stamp)) + table.insert(metrics_str, string.format('%s %s %s', mname, mvalue or 'null', stamp)) end metrics_str = table.concat(metrics_str, '\n') |