]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Rewrite rspamd_stats.pl and mapstats.pl as rspamadm Lua subcommands
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 10 Feb 2026 20:10:43 +0000 (20:10 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 10 Feb 2026 20:10:43 +0000 (20:10 +0000)
commita98353ae7eb5163e7c8a22f702e8bd793a441b5c
tree41c3e5c6e81a2b1c0ac9a0a6266d9adcc8122661
parentafc80387a9618259bd247982f2287c4c22c8f120
[Feature] Rewrite rspamd_stats.pl and mapstats.pl as rspamadm Lua subcommands

Add rspamadm logstats and rspamadm mapstats commands that replace the
Perl utility scripts utils/rspamd_stats.pl and utils/mapstats.pl.

- lua_log_utils.lua: shared library for log format detection, timestamp
  conversion, compressed file handling, directory scanning, and progress
  spinner
- logstats.lua: full port of rspamd_stats.pl with all options including
  symbol filtering, bidirectional symbols, groups, correlations, score
  multipliers, time range filtering, and JSON output via UCL
- mapstats.lua: full port of mapstats.pl using native rspamd_config for
  multimap access, rspamd_regexp for regex maps with full flag support,
  and rspamd_ip for IP/CIDR matching (no external dependencies)
lualib/lua_log_utils.lua [new file with mode: 0644]
lualib/rspamadm/logstats.lua [new file with mode: 0644]
lualib/rspamadm/mapstats.lua [new file with mode: 0644]