完善线上配置

This commit is contained in:
2026-05-08 05:57:27 +00:00
parent e44a3c900b
commit 05eff7ea0f
5 changed files with 18 additions and 7 deletions

View File

@@ -1,2 +1,5 @@
# 根用户密码,不要为空
CLICKHOUSE_PASSWORD=
# caddy 监听地址,可以是域名或者本机公网 ip
CADDY_GRAFANA_HOST=

View File

@@ -1,8 +1,8 @@
:20080 {
redirect https://{host}{uri}:20443
{
default_sni {$GRAFANA_HOST}
}
:20443 {
https://{$GRAFANA_HOST}:20443 {
tls internal
reverse_proxy grafana:3000
}

View File

@@ -18,12 +18,16 @@ services:
otel-collector-esxi:
image: otel/opentelemetry-collector-contrib:latest
environment:
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
volumes:
- ./otel/esxi.yaml:/etc/otelcol-contrib/config.yaml
restart: unless-stopped
otel-collector-app:
image: otel/opentelemetry-collector-contrib:latest
environment:
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
volumes:
- ./otel/app.yaml:/etc/otelcol-contrib/config.yaml
ports:
@@ -39,6 +43,8 @@ services:
caddy:
image: caddy:latest
environment:
- GRAFANA_HOST=${CADDY_GRAFANA_HOST}
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
ports:

View File

@@ -13,7 +13,7 @@ exporters:
clickhouse:
endpoint: tcp://clickhouse:9000
username: default
password: "123456"
password: ${CLICKHOUSE_PASSWORD}
service:
pipelines:

View File

@@ -84,7 +84,7 @@ exporters:
clickhouse:
endpoint: tcp://clickhouse:9000
username: default
password: "123456"
password: ${CLICKHOUSE_PASSWORD}
service:
pipelines:
@@ -110,6 +110,8 @@ service:
processors:
- batch
- resource/103.183.122.5
exporters:
- clickhouse
metrics/103.183.123.3:
receivers:
- vcenter/103.183.123.3