1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- version: "3"
- networks:
- otel-clickhouse:
- services:
- otelcollector:
- build:
- context: ../../../local
- dockerfile: ../exporter/clickhouseexporter/example/Dockerfile
- # Uncomment the next line to use a preexisting image
- # image: otelcontribcol:latest
- container_name: otel
- command:
- - "--config=/etc/otel-collector-config.yml"
- - "--set=service.telemetry.logs.level=INFO"
- volumes:
- - ./otel-collector-config.yml:/etc/otel-collector-config.yml
- ports:
- - "4317:4317" # otlp receiver
- - "1888:1888" # pprof extension
- - "13133:13133" # health_check extension
- - "55679:55679" # zpages extension
- - "24224:24224" # fluentforwarder
- - "24224:24224/udp" # fluentforwarder
- depends_on:
- - clickhouse
- networks:
- - otel-clickhouse
- clickhouse:
- image: clickhouse/clickhouse-server:latest
- ports:
- - "9000:9000"
- - "8123:8123"
- networks:
- - otel-clickhouse
- grafana:
- image: grafana/grafana:latest
- volumes:
- - ./grafana.ini:/etc/grafana/grafana.ini
- - ./datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
- environment:
- GF_INSTALL_PLUGINS: grafana-clickhouse-datasource,vertamedia-clickhouse-datasource
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: vertamedia-clickhouse-datasource
- ports:
- - "3001:3000"
- networks:
- - otel-clickhouse
- # Log generator
- flog:
- image: mingrammer/flog:0.4.3
- # Output fake log in JSON format
- command: [ "--format=json", "--loop", "--delay=100ms"]
- networks:
- - otel-clickhouse
- depends_on:
- - otelcollector
- logging:
- driver: fluentd
- options:
- mode: non-blocking
- # Allow time for otel-collector to spin up, then forward fluentd logs to the fluentforwarder receiver.
- fluentd-async-connect: "true"
- # Use nanosecond precision
- fluentd-sub-second-precision: "true"
- stop_signal: SIGKILL
- # Traces generator
- tracegen:
- build:
- context: ../../../cmd/tracegen/
- command:
- - --otlp-endpoint=otelcollector:4317
- - --otlp-insecure
- - --rate=100
- - --duration=10000h
- networks:
- - otel-clickhouse
- depends_on:
- - otelcollector
|