Sign inSign up

vespersio/fluentd-elasticsearch

By vespersio

Updated about 5 years ago

Image
0

1.8K

vespersio/fluentd-elasticsearch repository overview

Dockerfile

FROM fluent/fluentd:edge
USER root
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-document", "--version", "4.0.10"]
USER fluent

docker-compose.yml

version: "3.7"
services:
  elasticsearch:
    image: blacktop/elasticsearch:7
    container_name: elasticsearch
    hostname: elasticsearch
    environment:
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
      - 9300:9300
    volumes:
      - ./data:/usr/share/elasticsearch/data
  kibana:
    image: blacktop/kibana:7
    container_name: kibana
    hostname: kibana
    ports:
      - 5601:5601
  fluentd:
    image: vespersio/fluentd-elasticsearch:edge
    container_name: fluentd
    hostname: fluentd
    ports:
      - "24224:24224"
      - "24224:24224/udp"
    volumes:
      - ./fluent.conf:/fluentd/etc/fluent.conf

fluent.conf

<source>
  @type forward
  port 24224
  bind 0.0.0.0
</source>
<match *.**>
  @type copy
  <store>
    @type elasticsearch
    host elasticsearch
    port 9200
    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
  </store>
  <store>
    @type stdout
  </store>
</match>

Tag summary

Content type

Image

Digest

Size

19.6 MB

Last updated

about 5 years ago

docker pull vespersio/fluentd-elasticsearch