From 728544002e36b319f8acec80976a95264a51e827 Mon Sep 17 00:00:00 2001 From: Jimmy Herrera Date: Thu, 15 Nov 2018 11:22:35 -0600 Subject: [PATCH] Change elasticsearch template output to add index custom parms --- templates/03-elasticsearch-output.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/03-elasticsearch-output.conf.j2 b/templates/03-elasticsearch-output.conf.j2 index 4eaeed2..941519e 100644 --- a/templates/03-elasticsearch-output.conf.j2 +++ b/templates/03-elasticsearch-output.conf.j2 @@ -1,7 +1,7 @@ output { elasticsearch { hosts => {{ logstash_elasticsearch_hosts | to_json }} - index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}" - document_type => "%{[@metadata][beat]}-%{+YYYY.MM.dd}" + index => "%{[fields][index_pool]}-%{[fields][index_env]}-%{[fields][index_doc_type]}-%{+YYYY.MM.dd}" + document_type => "%{[fields][index_doc_type]}" } } \ No newline at end of file