commit 175c584: Update elastic.lua

GitHub noreply at github.com
Thu Jun 27 18:35:06 UTC 2019


Author: ol3k
Date: 2019-06-27 20:28:22 +0200
URL: https://github.com/rspamd/rspamd/commit/175c584e6805edb4a60aa15b673344ec98d13f42 (refs/pull/2949/head)

Update elastic.lua

---
 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 98ac7989c..f0d339205 100644
--- a/src/plugins/lua/elastic.lua
+++ b/src/plugins/lua/elastic.lua
@@ -34,6 +34,7 @@ local elastic_template
 local redis_params
 local N = "elastic"
 local E = {}
+local HOSTNAME = util.get_hostname()
 local connect_prefix = 'http://'
 local enabled = true
 local ingest_geoip_type = 'plugins'
@@ -146,7 +147,7 @@ local function get_general_metadata(task)
   r.user = task:get_user() or 'unknown'
   r.qid = task:get_queue_id() or 'unknown'
   r.action = task:get_metric_action('default')
-  r.rspamd_server = util.get_hostname() or 'unknown'  
+  r.rspamd_server = HOSTNAME  
   if r.user ~= 'unknown' then
       r.direction = "Outbound"
   end


More information about the Commits mailing list