diff --git a/docker-compose.yml b/docker-compose.yml index 38d4ec5..0a13b6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -65,6 +65,20 @@ services: INFLUXDB_REPORTING_DISABLED: 'false' SERVICE_8086_NAME: 'influxdb' + elasticsearch: + image: elasticsearch:6.5.1 + expose: + - 9200 + ports: + - "9200:9200" + + kibana: + image: kibana:6.5.1 + links: + - "elasticsearch" + ports: + - "5601:5601" + volumes: portainer_data: diff --git a/fluentd/Dockerfile b/fluentd/Dockerfile index 1446d54..3891503 100644 --- a/fluentd/Dockerfile +++ b/fluentd/Dockerfile @@ -1,3 +1,3 @@ FROM fluent/fluentd:latest -RUN ["gem", "install", "fluent-plugin-influxdb", "--no-rdoc", "--no-ri"] +RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-rdoc", "--no-ri"] diff --git a/fluentd/conf/fluent.conf b/fluentd/conf/fluent.conf index 4f268d8..b307c90 100644 --- a/fluentd/conf/fluent.conf +++ b/fluentd/conf/fluent.conf @@ -7,10 +7,13 @@ @type copy - @type influxdb - host influxdb_elena - dbname logging - port 8086 + @type elasticsearch + host elastic_elena + logstash_format true + logstash_prefix fluentd + logstash_dateformat %Y%m%d + include_tag_key true + type_name access_log tag_key @log_name flush_interval 1s