diff --git a/docker-compose.yaml b/docker-compose.yaml index 7145c89..4fffb0d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,11 +8,11 @@ services: volumes: - ./otel-collector/config.yaml:/etc/otel-collector-config.yaml ports: - - 4317:4317 # OTLP gRPC receiver + - 4317:4317 # OTLP gRPC receiver - 4318:4318 # OTLP http receiver expose: - 13133:13133 # health_check extension - - 8889:8889 # Prometheus exporter metrics + - 8889:8889 # Prometheus exporter metrics - 8888:8888 # Prometheus metrics exposed by the Collector depends_on: - loki @@ -40,19 +40,19 @@ services: - "--config.file=/etc/prometheus/config.yaml" - "--storage.tsdb.path=/prometheus" - "--web.enable-remote-write-receiver" - + tempo: image: grafana/tempo:2.3.1 - command: [ "-config.file=/etc/tempo/config.yaml" ] + command: ["-config.file=/etc/tempo/config.yaml"] depends_on: - prometheus volumes: - ./tempo/config.yaml:/etc/tempo/config.yaml - tempo_data:/tempo-data expose: - - "3200" # tempo - - "4317" # otlp grpc - - "4318" # otlp http + - "3200" # tempo + - "4317" # otlp grpc + - "4318" # otlp http grafana: image: grafana/grafana:10.0.10 @@ -79,50 +79,19 @@ services: GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: "true" volumes: - grafana_data:/var/lib/grafana + - ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/ds.yaml ports: - ${GRAFANA_PORT}:3000 - entrypoint: - - sh - - -euc - - | - mkdir -p /etc/grafana/provisioning/datasources - cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml - apiVersion: 1 - datasources: - - name: Loki - type: loki - access: proxy - orgId: 1 - url: http://loki:3100 - basicAuth: false - isDefault: false - version: 1 - editable: false - - name: Prometheus - type: prometheus - access: proxy - orgId: 1 - url: http://prometheus:9090 - basicAuth: false - isDefault: false - version: 1 - editable: false - - name: Tempo - type: tempo - access: proxy - orgId: 1 - url: http://tempo:3200 - basicAuth: false - isDefault: false - version: 1 - editable: false - jsonData: - httpMethod: GET - EOF - /run.sh + networks: + - default + - www + +networks: + www: + external: true volumes: loki_data: prometheus_data: tempo_data: - grafana_data: \ No newline at end of file + grafana_data: diff --git a/grafana/datasources.yaml b/grafana/datasources.yaml new file mode 100644 index 0000000..219e8e9 --- /dev/null +++ b/grafana/datasources.yaml @@ -0,0 +1,31 @@ +apiVersion: 1 +datasources: + - name: Loki + type: loki + access: proxy + orgId: 1 + url: http://loki:3100 + basicAuth: false + isDefault: false + version: 1 + editable: false + - name: Prometheus + type: prometheus + access: proxy + orgId: 1 + url: http://prometheus:9090 + basicAuth: false + isDefault: false + version: 1 + editable: false + - name: Tempo + type: tempo + access: proxy + orgId: 1 + url: http://tempo:3200 + basicAuth: false + isDefault: false + version: 1 + editable: false + jsonData: + httpMethod: GET