Merge "Upgrade ELK to 6.1.3"
authorSébastien Determe <sd378r@intl.att.com>
Tue, 11 Sep 2018 09:11:08 +0000 (09:11 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 11 Sep 2018 09:11:08 +0000 (09:11 +0000)
extra/docker/elk/docker-compose.yml
extra/docker/elk/logstash-conf/logstash.conf

index 388c318..3b5571e 100644 (file)
@@ -2,16 +2,20 @@ version: '3.1'
 
 services:
   elasticsearch:
-    image: elasticsearch
+    image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
     ports:
       - 9200:9200
     networks:
       es_net:
         aliases:
           - elasticsearch
+    environment:
+      - cluster.name=docker-cluster
+      - bootstrap.memory_lock=false
+      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
 
   logstash:
-    image: logstash
+    image: docker.elastic.co/logstash/logstash:6.1.3
     volumes:
       - ./logstash-conf:/config-dir
       - ./logstash-input:/log-input
@@ -29,9 +33,10 @@ services:
       - event_topic=EVENT_TOPIC
       - notification_topic=NOTIFICATION_TOPIC
       - request_topic=REQUEST_TOPIC
+      - elasticsearch_hosts=elasticsearch
 
   kibana:
-    image: kibana
+    image: docker.elastic.co/kibana/kibana:6.1.3
     ports:
       - 5601:5601
     depends_on:
index c511995..2b71686 100644 (file)
@@ -31,8 +31,8 @@ input {
         }
         socket_timeout => 30
         request_timeout => 30
-        interval => 60
         codec => "plain"
+        schedule => { "every" => "1m"  }
   }
 }
 
@@ -131,15 +131,15 @@ output {
     if [http_request_failure] {
         elasticsearch {
             codec => "json"
-            hosts => [elasticsearch]
+            hosts => ["${elasticsearch_hosts}"]
             index => "errors-%{+YYYY.MM.DD}"
             doc_as_upsert => true
         }
     } else {
         elasticsearch {
             codec => "json"
-            hosts => [elasticsearch]
-            index => "logstash-%{+YYYY.MM.DD}" # creates daily indexes
+            hosts => ["${elasticsearch_hosts}"]
+            index => "events-%{+YYYY.MM.DD}" # creates daily indexes
             doc_as_upsert => true
 
         }