[Rspamd-Users] metadata_exporter.conf with plain text output

patpro at patpro.net patpro at patpro.net
Wed Oct 11 13:40:02 UTC 2023


Hello,

Anyone?

September 26, 2023 11:27 AM, "patpro--- via Users" <users at lists.rspamd.com> wrote:

> Hello,
> 
> I’m currently using this local.d/metadata_exporter.conf :
> 
> # Define custom backend(s)
> custom_push {
> mine = <<EOD
> return function (task, data, rule)
> -- Log payload
> local rspamd_logger = require "rspamd_logger"
> rspamd_logger.infox(task, 'METATEST %s', data)
> end
> EOD;
> }
> 
> rules {
> CUSTOM_EXPORT {
> selector = "default";
> formatter = "json";
> backend = "mine";
> }
> }
> 
> it pushes JSON-formated info into the main log file rspamd.log.
> 
> Is there a way to push the same JSON message in a different text file (probably by using something
> different from rspamd_logger)? 
> I need pure JSON in the destination file (no timestamp/pid/etc. prefix like "2023-09-24 15:18:18
> #53980(rspamd_proxy) <0b9aa0>…").
> 
> Thanks,
> Patrick
> -- 
> Users mailing list
> Users at lists.rspamd.com
> https://lists.rspamd.com/mailman/listinfo/users


More information about the Users mailing list