修改并优化配置到新 ip 段

This commit is contained in:
2026-04-30 11:56:29 +08:00
parent 6985b70ddc
commit d2d1ab4461
6 changed files with 97 additions and 47 deletions

View File

@@ -1,2 +1,6 @@
# 根用户密码,不要为空 # 根用户密码,不要为空
CLICKHOUSE_PASSWORD= CLICKHOUSE_PASSWORD=
# 收集器被动模式监听地址,非 tls 传输,只在内网监听,不要暴露到公网
OTEL_COLLECTOR_APP_GRPC_HOST=
OTEL_COLLECTOR_APP_HTTP_HOST=

View File

@@ -0,0 +1,11 @@
<clickhouse>
<!-- Listen wildcard address to allow accepting connections from other containers and host network. -->
<listen_host>::</listen_host>
<listen_host>0.0.0.0</listen_host>
<listen_try>1</listen_try>
<logger>
<level>notice</level>
<console>1</console>
</logger>
</clickhouse>

View File

@@ -0,0 +1,8 @@
<clickhouse>
<!-- <mark_cache_size>4294967296</mark_cache_size> -->
<!-- no metrics, thus no more disk write -->
<metric_log remove="1" />
<asynchronous_metric_log remove="1" />
<text_log remove="1" />
<trace_log remove="1" />
</clickhouse>

View File

@@ -0,0 +1,10 @@
<clickhouse>
<!--
<trace_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</trace_log>
<text_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</text_log>
-->
</clickhouse>

View File

@@ -7,7 +7,7 @@ services:
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
volumes: volumes:
- clickhouse-data:/var/lib/clickhouse - clickhouse-data:/var/lib/clickhouse
- ./clickhouse/logs:/var/log/clickhouse-server - ./clickhouse/configs:/etc/clickhouse-server/config.d:ro
ulimits: ulimits:
nofile: nofile:
soft: 262144 soft: 262144
@@ -27,8 +27,8 @@ services:
volumes: volumes:
- ./otel/app.yaml:/etc/otelcol-contrib/config.yaml - ./otel/app.yaml:/etc/otelcol-contrib/config.yaml
ports: ports:
- 4317:4317 - ${OTEL_COLLECTOR_APP_GRPC_PORT}:4317
- 4318:4318 - ${OTEL_COLLECTOR_APP_HTTP_PORT}:4318
restart: unless-stopped restart: unless-stopped
grafana: grafana:

View File

@@ -1,36 +1,42 @@
receivers: receivers:
vcenter/43.226.58.3: vcenter/103.183.122.3:
endpoint: https://43.226.58.3 endpoint: https://103.183.122.3
username: root username: root
password: idc321.. password: idc321..
tls: tls:
insecure: true insecure: true
vcenter/43.226.58.4: vcenter/103.183.122.4:
endpoint: https://43.226.58.4 endpoint: https://103.183.122.4
username: root username: root
password: juip916... password: juip916...
tls: tls:
insecure: true insecure: true
vcenter/43.226.59.3: vcenter/103.183.122.5:
endpoint: https://43.226.59.3:8443 endpoint: https://103.183.122.5
username: root username: root
password: juip916... password: juip916...
tls: tls:
insecure: true insecure: true
vcenter/43.226.59.4: vcenter/103.183.123.3:
endpoint: https://43.226.59.4 endpoint: https://103.183.123.3:8443
username: root
password: juip916...
tls:
insecure: true
vcenter/103.183.123.4:
endpoint: https://103.183.123.4
username: root username: root
password: idc321.. password: idc321..
tls: tls:
insecure: true insecure: true
vcenter/43.226.59.5: vcenter/103.183.123.5:
endpoint: https://43.226.59.5:8443 endpoint: https://103.183.123.5:8443
username: root username: root
password: juip916... password: juip916...
tls: tls:
insecure: true insecure: true
vcenter/43.226.59.6: vcenter/103.183.123.6:
endpoint: https://43.226.59.6:8443 endpoint: https://103.183.123.6:8443
username: root username: root
password: juip916... password: juip916...
tls: tls:
@@ -38,36 +44,41 @@ receivers:
processors: processors:
batch: batch:
resource/43.226.58.3: resource/103.183.122.3:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.58.3 value: 103.183.122.3
resource/43.226.58.4: resource/103.183.122.4:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.58.4 value: 103.183.122.4
resource/43.226.59.3: resource/103.183.122.5:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.59.3 value: 103.183.122.5
resource/43.226.59.4: resource/103.183.123.3:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.59.4 value: 103.183.123.3
resource/43.226.59.5: resource/103.183.123.4:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.59.5 value: 103.183.123.4
resource/43.226.59.6: resource/103.183.123.5:
attributes: attributes:
- key: vcenter.host.address - key: vcenter.host.address
action: upsert action: upsert
value: 43.226.59.6 value: 103.183.123.5
resource/103.183.123.6:
attributes:
- key: vcenter.host.address
action: upsert
value: 103.183.123.6
exporters: exporters:
clickhouse: clickhouse:
@@ -77,51 +88,57 @@ exporters:
service: service:
pipelines: pipelines:
metrics/43.226.58.3: metrics/103.183.122.3:
receivers: receivers:
- vcenter/43.226.58.3 - vcenter/103.183.122.3
processors: processors:
- batch - batch
- resource/43.226.58.3 - resource/103.183.122.3
exporters: exporters:
- clickhouse - clickhouse
metrics/43.226.58.4: metrics/103.183.122.4:
receivers: receivers:
- vcenter/43.226.58.4 - vcenter/103.183.122.4
processors: processors:
- batch - batch
- resource/43.226.58.4 - resource/103.183.122.4
exporters: exporters:
- clickhouse - clickhouse
metrics/43.226.59.3: metrics/103.183.122.5:
receivers: receivers:
- vcenter/43.226.59.3 - vcenter/103.183.122.5
processors: processors:
- batch - batch
- resource/43.226.59.3 - resource/103.183.122.5
exporters: metrics/103.183.123.3:
- clickhouse
metrics/43.226.59.4:
receivers: receivers:
- vcenter/43.226.59.4 - vcenter/103.183.123.3
processors: processors:
- batch - batch
- resource/43.226.59.4 - resource/103.183.123.3
exporters: exporters:
- clickhouse - clickhouse
metrics/43.226.59.5: metrics/103.183.123.4:
receivers: receivers:
- vcenter/43.226.59.5 - vcenter/103.183.123.4
processors: processors:
- batch - batch
- resource/43.226.59.5 - resource/103.183.123.4
exporters: exporters:
- clickhouse - clickhouse
metrics/43.226.59.6: metrics/103.183.123.5:
receivers: receivers:
- vcenter/43.226.59.6 - vcenter/103.183.123.5
processors: processors:
- batch - batch
- resource/43.226.59.6 - resource/103.183.123.5
exporters:
- clickhouse
metrics/103.183.123.6:
receivers:
- vcenter/103.183.123.6
processors:
- batch
- resource/103.183.123.6
exporters: exporters:
- clickhouse - clickhouse