Page MenuHomeSoftware Heritage

Make logstash on banco store documents on Elasticsearch version 6.x nodes
Closed, MigratedEdits Locked

Description

Starting from version 6.0, Elasticsearch no longer creates indices with more than one mapping type.
In order to create new indices with a forward-compatible format, the Logstash instance on Banco must thus use an Elasticsearch 6.x node as output target.

Event Timeline

ftigeot triaged this task as Normal priority.Mar 6 2018, 3:35 PM
ftigeot created this task.
ftigeot renamed this task from Upgrade logstash on banco to version 6.x to Make logstash on banco store documents on Elasticsearch version 6.x nodes.May 23 2018, 3:50 PM
ftigeot updated the task description. (Show Details)

Elasticsearch 6.x is also unable to write new data to indexes created with more than one mapping type (the default on previous versions).

Logstash configuration on banco changed to inject data on the esnode1 and 2 Elasticsearch instances:

diff --git a/logstash/conf.d/output.conf b/logstash/conf.d/output.conf
index ffa134a..2d6e703 100644
--- a/logstash/conf.d/output.conf
+++ b/logstash/conf.d/output.conf
@@ -1,12 +1,18 @@
 output {
     if "swh-worker@" in [systemd_unit] {
         elasticsearch {
-               hosts => ["localhost:9200"]
+               hosts => [
+                       "esnode1.internal.softwareheritage.org:9200",
+                       "esnode2.internal.softwareheritage.org:9200"
+               ]
                 index => "swh_workers-%{+YYYY.MM.dd}"
         }
     } else {
         elasticsearch {
-               hosts => ["localhost:9200"]
+               hosts => [
+                       "esnode1.internal.softwareheritage.org:9200",
+                       "esnode2.internal.softwareheritage.org:9200"
+               ]
                 index => "systemlogs-%{+YYYY.MM.dd}"
         }
     }

No visible issues so far.