diff options
author | ol3k <c.crampen@gmail.com> | 2019-06-27 20:28:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 20:28:22 +0200 |
commit | 175c584e6805edb4a60aa15b673344ec98d13f42 (patch) | |
tree | 12c5726d4b990361baa6715b63a19eb1b8477cde /src | |
parent | 069a4291a5a32f01211ba695db0a35036b11461b (diff) | |
download | rspamd-175c584e6805edb4a60aa15b673344ec98d13f42.tar.gz rspamd-175c584e6805edb4a60aa15b673344ec98d13f42.zip |
Update elastic.lua
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/elastic.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |