docker-compose.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. version: "3"
  2. networks:
  3. otel-clickhouse:
  4. services:
  5. otelcollector:
  6. build:
  7. context: ../../../local
  8. dockerfile: ../exporter/clickhouseexporter/example/Dockerfile
  9. # Uncomment the next line to use a preexisting image
  10. # image: otelcontribcol:latest
  11. container_name: otel
  12. command:
  13. - "--config=/etc/otel-collector-config.yml"
  14. - "--set=service.telemetry.logs.level=INFO"
  15. volumes:
  16. - ./otel-collector-config.yml:/etc/otel-collector-config.yml
  17. ports:
  18. - "4317:4317" # otlp receiver
  19. - "1888:1888" # pprof extension
  20. - "13133:13133" # health_check extension
  21. - "55679:55679" # zpages extension
  22. - "24224:24224" # fluentforwarder
  23. - "24224:24224/udp" # fluentforwarder
  24. depends_on:
  25. - clickhouse
  26. networks:
  27. - otel-clickhouse
  28. clickhouse:
  29. image: clickhouse/clickhouse-server:latest
  30. ports:
  31. - "9000:9000"
  32. - "8123:8123"
  33. networks:
  34. - otel-clickhouse
  35. grafana:
  36. image: grafana/grafana:latest
  37. volumes:
  38. - ./grafana.ini:/etc/grafana/grafana.ini
  39. - ./datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
  40. environment:
  41. GF_INSTALL_PLUGINS: grafana-clickhouse-datasource,vertamedia-clickhouse-datasource
  42. GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: vertamedia-clickhouse-datasource
  43. ports:
  44. - "3001:3000"
  45. networks:
  46. - otel-clickhouse
  47. # Log generator
  48. flog:
  49. image: mingrammer/flog:0.4.3
  50. # Output fake log in JSON format
  51. command: [ "--format=json", "--loop", "--delay=100ms"]
  52. networks:
  53. - otel-clickhouse
  54. depends_on:
  55. - otelcollector
  56. logging:
  57. driver: fluentd
  58. options:
  59. mode: non-blocking
  60. # Allow time for otel-collector to spin up, then forward fluentd logs to the fluentforwarder receiver.
  61. fluentd-async-connect: "true"
  62. # Use nanosecond precision
  63. fluentd-sub-second-precision: "true"
  64. stop_signal: SIGKILL
  65. # Traces generator
  66. tracegen:
  67. build:
  68. context: ../../../cmd/tracegen/
  69. command:
  70. - --otlp-endpoint=otelcollector:4317
  71. - --otlp-insecure
  72. - --rate=100
  73. - --duration=10000h
  74. networks:
  75. - otel-clickhouse
  76. depends_on:
  77. - otelcollector