This commit is contained in:
reonokiy 2025-05-16 14:10:02 +08:00
parent ba0ec9384d
commit 714b5a313b
Signed by: reonokiy
SSH key fingerprint: SHA256:2VjKpUxMIe0QYY3OVnOMuPiB0X5pvrIpJ+UiyFhxtq0
3 changed files with 29 additions and 15 deletions

View file

@ -0,0 +1,7 @@
services:
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- '3000:3000'

View file

@ -23,9 +23,9 @@ services:
restart: always restart: always
command: [ "--config", "/etc/vector/vector.toml" ] command: [ "--config", "/etc/vector/vector.toml" ]
environment: environment:
OPENOBSERVE_URL: ${OPENOBSERVE_URL} OTEL_URI: ${OTEL_URI}
OPENOBSERVE_USER: ${OPENOBSERVE_USER} OTEL_USER: ${OTEL_USER}
OPENOBSERVE_PASSWORD: ${OPENOBSERVE_PASSWORD} OTEL_PASSWORD: ${OTEL_PASSWORD}
volumes: volumes:
- ${VECTOR_CONFIG_PATH:-./vector.toml}:/etc/vector/vector.toml:ro - ${VECTOR_CONFIG_PATH:-./vector.toml}:/etc/vector/vector.toml:ro
- ${DATA_DIR:-./data}/vector:/var/lib/vector:Z - ${DATA_DIR:-./data}/vector:/var/lib/vector:Z

View file

@ -11,15 +11,22 @@ include_containers = ["openobserve"]
type = "prometheus_scrape" type = "prometheus_scrape"
endpoints = ["http://openobserve:5080/metrics"] endpoints = ["http://openobserve:5080/metrics"]
[sinks.openobserve] [sinks.otel_logs]
inputs = ["observe_nokiy_net_logs", "observe_nokiy_net_metrics"] type = "opentelemetry"
type = "http" encoding = "json"
uri = "${OPENOBSERVE_URL}" inputs = ["observe_nokiy_net_logs"]
method = "post" protocol.type = "http"
auth.strategy = "basic" protocol.uri = "${OTEL_URI}"
auth.user = "${OPENOBSERVE_USER}" protocol.auth.strategy = "basic"
auth.password = "${OPENOBSERVE_PASSWORD}" protocol.auth.user = "${OTEL_USER}"
compression = "gzip" protocol.auth.password = "${OTEL_PASSWORD}"
encoding.codec = "json" protocol.compression = "zstd"
encoding.timestamp_format = "rfc3339"
healthcheck.enabled = false
# [sinks.otel_metrics]
# type = "opentelemetry"
# inputs = ["my-source-or-transform-id"]
# [sinks.otel_traces]
# type = "opentelemetry"
# inputs = ["my-source-or-transform-id"]