mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
init openobserve docker yml
This commit is contained in:
66
.docker/openobserve-otel/docker-compose.yml
Normal file
66
.docker/openobserve-otel/docker-compose.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
services:
|
||||
openobserve:
|
||||
image: public.ecr.aws/zinclabs/openobserve:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ZO_ROOT_USER_EMAIL: "root@rustfs.com"
|
||||
ZO_ROOT_USER_PASSWORD: "rustfs123"
|
||||
ZO_TRACING_HEADER_KEY: "Authorization"
|
||||
ZO_TRACING_HEADER_VALUE: "Bearer cm9vdEBydXN0ZnMuY29tOmxIV0RqQmZMWXJ6MnZOajU="
|
||||
ZO_DATA_DIR: "/data"
|
||||
ZO_MEMORY_CACHE_ENABLED: "true"
|
||||
ZO_MEMORY_CACHE_MAX_SIZE: "256"
|
||||
RUST_LOG: "info"
|
||||
ports:
|
||||
- "5080:5080"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:5080/health" ]
|
||||
interval: 10s
|
||||
timeout: 2s
|
||||
retries: 3
|
||||
networks:
|
||||
- otel-network
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
reservations:
|
||||
memory: 256M
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
|
||||
ports:
|
||||
- "4317:4317" # OTLP gRPC
|
||||
- "4318:4318" # OTLP HTTP
|
||||
- "13133:13133" # Health check
|
||||
- "1777:1777" # pprof
|
||||
- "55679:55679" # zpages
|
||||
depends_on:
|
||||
openobserve:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- otel-network
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 400M
|
||||
reservations:
|
||||
memory: 200M
|
||||
|
||||
networks:
|
||||
otel-network:
|
||||
driver: bridge
|
||||
name: otel-network
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
gateway: 172.28.0.1
|
||||
labels:
|
||||
com.example.description: "Network for OpenObserve and OpenTelemetry Collector"
|
||||
volumes:
|
||||
data:
|
||||
58
.docker/openobserve-otel/otel-collector-config.yaml
Normal file
58
.docker/openobserve-otel/otel-collector-config.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
filelog:
|
||||
include: [ "/var/log/app/*.log" ]
|
||||
start_at: end
|
||||
|
||||
processors:
|
||||
batch:
|
||||
timeout: 1s
|
||||
send_batch_size: 1024
|
||||
memory_limiter:
|
||||
check_interval: 1s
|
||||
limit_mib: 400
|
||||
spike_limit_mib: 100
|
||||
|
||||
exporters:
|
||||
otlphttp/openobserve:
|
||||
endpoint: http://openobserve:5080/api/default
|
||||
headers:
|
||||
Authorization: "Bearer cm9vdEBydXN0ZnMuY29tOmxIV0RqQmZMWXJ6MnZOajU="
|
||||
stream-name: default
|
||||
organization: default
|
||||
tls:
|
||||
insecure: true
|
||||
compression: gzip
|
||||
retry_on_failure:
|
||||
enabled: true
|
||||
initial_interval: 5s
|
||||
max_interval: 30s
|
||||
max_elapsed_time: 300s
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [ otlp ]
|
||||
processors: [ memory_limiter, batch ]
|
||||
exporters: [ otlphttp/openobserve ]
|
||||
metrics:
|
||||
receivers: [ otlp ]
|
||||
processors: [ memory_limiter, batch ]
|
||||
exporters: [ otlphttp/openobserve ]
|
||||
logs:
|
||||
receivers: [ otlp, filelog ]
|
||||
processors: [ memory_limiter, batch ]
|
||||
exporters: [ otlphttp/openobserve ]
|
||||
extensions:
|
||||
health_check:
|
||||
endpoint: 0.0.0.0:13133
|
||||
pprof:
|
||||
endpoint: 0.0.0.0:1777
|
||||
zpages:
|
||||
endpoint: 0.0.0.0:55679
|
||||
|
||||
@@ -37,7 +37,7 @@ export RUSTFS_CONSOLE_ADDRESS=":9002"
|
||||
# export RUSTFS_TLS_PATH="./deploy/certs"
|
||||
|
||||
# 具体路径修改为配置文件真实路径,obs.example.toml 仅供参考 其中 `RUSTFS_OBS_CONFIG` 和下面变量二选一
|
||||
export RUSTFS_OBS_CONFIG="./deploy/config/obs.example.toml"
|
||||
# export RUSTFS_OBS_CONFIG="./deploy/config/obs.example.toml"
|
||||
|
||||
# 如下变量需要必须参数都有值才可以,以及会覆盖配置文件中的值
|
||||
#export RUSTFS__OBSERVABILITY__ENDPOINT=http://localhost:4317
|
||||
|
||||
Reference in New Issue
Block a user