aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2024-07-08 16:05:52 +0200
committerAndrew Lewis <nerf@judo.za.org>2024-07-08 16:05:52 +0200
commit2f9eebdf46e4c4bf7c2cb06724c1697431ce73bb (patch)
tree72b1e266b5b88782b66c52eae4ddc2bbcb7f6da0 /src/plugins
parent213c8ef3232ceada4e70fba6e3c4e72362cb5f15 (diff)
downloadrspamd-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.lua2
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')