From: Vsevolod Stakhov Date: Fri, 9 Mar 2018 11:55:02 +0000 (+0000) Subject: [Minor] Allow local messages to be exported to elasticsearch X-Git-Tag: 1.7.0~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=93cc4cf46d6c3978ce19f6c7d75975dc2020b337;p=rspamd.git [Minor] Allow local messages to be exported to elasticsearch --- 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)