This commit is contained in:
royalcat 2024-03-19 11:15:02 +03:00
parent 4d20743feb
commit 6d3a741b59
2 changed files with 47 additions and 47 deletions

View file

@ -8,11 +8,11 @@ services:
volumes: volumes:
- ./otel-collector/config.yaml:/etc/otel-collector-config.yaml - ./otel-collector/config.yaml:/etc/otel-collector-config.yaml
ports: ports:
- 4317:4317 # OTLP gRPC receiver - 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver - 4318:4318 # OTLP http receiver
expose: expose:
- 13133:13133 # health_check extension - 13133:13133 # health_check extension
- 8889:8889 # Prometheus exporter metrics - 8889:8889 # Prometheus exporter metrics
- 8888:8888 # Prometheus metrics exposed by the Collector - 8888:8888 # Prometheus metrics exposed by the Collector
depends_on: depends_on:
- loki - loki
@ -40,19 +40,19 @@ services:
- "--config.file=/etc/prometheus/config.yaml" - "--config.file=/etc/prometheus/config.yaml"
- "--storage.tsdb.path=/prometheus" - "--storage.tsdb.path=/prometheus"
- "--web.enable-remote-write-receiver" - "--web.enable-remote-write-receiver"
tempo: tempo:
image: grafana/tempo:2.3.1 image: grafana/tempo:2.3.1
command: [ "-config.file=/etc/tempo/config.yaml" ] command: ["-config.file=/etc/tempo/config.yaml"]
depends_on: depends_on:
- prometheus - prometheus
volumes: volumes:
- ./tempo/config.yaml:/etc/tempo/config.yaml - ./tempo/config.yaml:/etc/tempo/config.yaml
- tempo_data:/tempo-data - tempo_data:/tempo-data
expose: expose:
- "3200" # tempo - "3200" # tempo
- "4317" # otlp grpc - "4317" # otlp grpc
- "4318" # otlp http - "4318" # otlp http
grafana: grafana:
image: grafana/grafana:10.0.10 image: grafana/grafana:10.0.10
@ -79,50 +79,19 @@ services:
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: "true" GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: "true"
volumes: volumes:
- grafana_data:/var/lib/grafana - grafana_data:/var/lib/grafana
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/ds.yaml
ports: ports:
- ${GRAFANA_PORT}:3000 - ${GRAFANA_PORT}:3000
entrypoint: networks:
- sh - default
- -euc - www
- |
mkdir -p /etc/grafana/provisioning/datasources networks:
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml www:
apiVersion: 1 external: true
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
volumes: volumes:
loki_data: loki_data:
prometheus_data: prometheus_data:
tempo_data: tempo_data:
grafana_data: grafana_data:

31
grafana/datasources.yaml Normal file
View file

@ -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