From 1fa20ffef685bcbc5a0b5d0d78b95593365177e3 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 19 Nov 2015 09:49:04 -0800 Subject: [PATCH] Logstash 2.0 compat ES output rule Logstash 2.0 defaults to HTTP elasticsearch output which means that the elasticsearch output (no _http) does HTTP and a new elasticsearch_java output exists if you want to continue doing the native api output. We had been doing HTTP so just need to update the output name. The host parameter is also deprecated and you must pass an array to the hosts parameter instead so update that as well. Note that this switches from using a local ES daemon to talking to the cluster itself directly because new logstash is able to load balance over http. This reduces the overhead necessary to have resilient ES connections. Note this is not compatbile with Logstash 1.3.3 which is what we are currently running so this change should only go in as part of an upgrade to Logstash 2.0 and beyond. Change-Id: I788ecb936f9fa5a006332ed626f90c33a255d9bf --- modules/openstack_project/templates/logstash/indexer.conf.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openstack_project/templates/logstash/indexer.conf.erb b/modules/openstack_project/templates/logstash/indexer.conf.erb index 1531a41b0c..4a567807f6 100644 --- a/modules/openstack_project/templates/logstash/indexer.conf.erb +++ b/modules/openstack_project/templates/logstash/indexer.conf.erb @@ -114,8 +114,8 @@ filter { } output { - elasticsearch_http { - host => "localhost" + elasticsearch { + hosts => <%= @elasticsearch_nodes.map { |node| node + ":9200" }.to_s %> manage_template => false flush_size => 1024 }