From 93cc4cf46d6c3978ce19f6c7d75975dc2020b337 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 9 Mar 2018 11:55:02 +0000 Subject: [PATCH] [Minor] Allow local messages to be exported to elasticsearch --- src/plugins/lua/elastic.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua index dfe8ce84c..a344a4bb7 100644 --- a/src/plugins/lua/elastic.lua +++ b/src/plugins/lua/elastic.lua @@ -46,6 +46,7 @@ local settings = { failover = false, import_kibana = false, use_https = false, + allow_local = false, } local function read_file(path) @@ -183,7 +184,7 @@ end local function elastic_collect(task) if not enabled then return end - if rspamd_lua_utils.is_rspamc_or_controller(task) then return end + if not settings.allow_local and rspamd_lua_utils.is_rspamc_or_controller(task) then return end local row = {['rspamd_meta'] = get_general_metadata(task), ['@timestamp'] = tostring(util.get_time() * 1000)} table.insert(rows, row) -- 2.39.5