demo with sdk and backend
This commit is contained in:
123
docker-compose.yml
Normal file
123
docker-compose.yml
Normal file
@@ -0,0 +1,123 @@
|
||||
services:
|
||||
fluentbit:
|
||||
depends_on:
|
||||
vlagent:
|
||||
condition: service_started
|
||||
required: true
|
||||
image: cr.fluentbit.io/fluent/fluent-bit:3.1.7
|
||||
restart: always
|
||||
networks:
|
||||
default: null
|
||||
ports:
|
||||
- 4318:4318
|
||||
volumes:
|
||||
- ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
|
||||
victorialogs-1:
|
||||
command:
|
||||
- -storageDataPath=/vlogs
|
||||
- -loggerFormat=json
|
||||
- -datadog.streamFields=service,hostname,ddsource
|
||||
- -journald.streamFields=_HOSTNAME,_SYSTEMD_UNIT,_PID
|
||||
- -journald.ignoreFields=MESSAGE_ID,INVOCATION_ID,USER_INVOCATION_ID
|
||||
- -journald.ignoreFields=_BOOT_ID,_MACHINE_ID,_SYSTEMD_INVOCATION_ID,_STREAM_ID,_UID
|
||||
deploy:
|
||||
replicas: 1
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- -qO-
|
||||
- http://127.0.0.1:9428/health
|
||||
timeout: 1s
|
||||
interval: 1s
|
||||
retries: 10
|
||||
image: docker.io/victoriametrics/victoria-logs:v1.50.0
|
||||
networks:
|
||||
default: null
|
||||
ports:
|
||||
- mode: ingress
|
||||
target: 9428
|
||||
published: "9428"
|
||||
protocol: tcp
|
||||
volumes:
|
||||
- type: volume
|
||||
source: victorialogs-1
|
||||
target: /vlogs
|
||||
volume: {}
|
||||
victoriametrics:
|
||||
command:
|
||||
- -storageDataPath=/vmsingle
|
||||
- -loggerFormat=json
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- -qO-
|
||||
- http://127.0.0.1:8428/health
|
||||
timeout: 1s
|
||||
interval: 1s
|
||||
retries: 10
|
||||
image: victoriametrics/victoria-metrics:v1.132.0
|
||||
networks:
|
||||
default: null
|
||||
ports:
|
||||
- 8428:8428
|
||||
volumes:
|
||||
- type: volume
|
||||
source: victoriametrics
|
||||
target: /vmsingle
|
||||
volume: {}
|
||||
vlagent:
|
||||
command:
|
||||
- --remoteWrite.tmpDataPath=/vlagent
|
||||
- --remoteWrite.url=http://victorialogs-1:9428/insert/native
|
||||
- --syslog.listenAddr.tcp=0.0.0.0:8094
|
||||
depends_on:
|
||||
victorialogs-1:
|
||||
condition: service_healthy
|
||||
required: true
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- -qO-
|
||||
- http://127.0.0.1:9429/health
|
||||
timeout: 1s
|
||||
interval: 1s
|
||||
retries: 10
|
||||
image: victoriametrics/vlagent:v1.50.0
|
||||
networks:
|
||||
default: null
|
||||
volumes:
|
||||
- type: volume
|
||||
source: vlagent
|
||||
target: /vlagent
|
||||
volume: {}
|
||||
demo-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: demo-app/Dockerfile
|
||||
environment:
|
||||
STARRYSDK_TELEMETRY_ENABLED: "true"
|
||||
STARRYSDK_SERVICE_NAME: starry-python-sdk-demo
|
||||
STARRYSDK_METRIC_EXPORT_INTERVAL_MS: "5000"
|
||||
#OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
DEMO_LOOP: "true"
|
||||
DEMO_INTERVAL_SECONDS: "5"
|
||||
DEMO_PATHS: ",__sdk_demo_not_found__"
|
||||
DEFAULT_OTLP_ENDPOINT: "http://fluentbit:4318"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
default:
|
||||
name: fluentbit-oltp_default
|
||||
volumes:
|
||||
victorialogs-1:
|
||||
name: fluentbit-oltp_victorialogs-1
|
||||
external: true
|
||||
victoriametrics:
|
||||
name: fluentbit-oltp_victoriametrics
|
||||
external: true
|
||||
vlagent:
|
||||
name: fluentbit-oltp_vlagent
|
||||
external: true
|
||||
Reference in New Issue
Block a user