aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-07-08 23:34:16 +0600
committerGitHub <noreply@github.com>2024-07-08 23:34:16 +0600
commit6496aba509da4fdf163dd026be39b858e1c3bb9c (patch)
treee4b40f78cbc4fda70cc1f0a4035f0ac3f5160186
parente9d6cfae21b9db130a7c83101954d2df1d6f89aa (diff)
parent2f9eebdf46e4c4bf7c2cb06724c1697431ce73bb (diff)
downloadrspamd-6496aba509da4fdf163dd026be39b858e1c3bb9c.tar.gz
rspamd-6496aba509da4fdf163dd026be39b858e1c3bb9c.zip
Merge pull request #5041 from fatalbanana/graphite_nil
[Fix] metric_exporter: avoid sending `nil` in metric values (#5027)
-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')