Skip to content

Commit 21f9b77

Browse files
authored
fix: metric docker command (#63)
1 parent 48ebfc9 commit 21f9b77

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

metric_monitor/REMOTE_WRITE_WITH_THANOS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ docker-compose -f ./docker-compose/thanos-receive.yml up -d
150150
As Promethus has already been configured to send metric metadata to Thanos Receive, check the logs to ensure the Thanos Receive is running properly.
151151

152152
```sh
153-
docker logs -f thanos-receive-0
153+
docker logs -f thanos-receive
154154
155155
...
156156
ts=2025-04-03T03:13:49.395927626Z caller=intrumentation.go:56 level=info component=receive msg="changing probe status" status=ready
@@ -180,7 +180,7 @@ Core configuration for Thanos Receive in [thanos-receive.yml](./docker-compose/t
180180
- "--remote-write.address=0.0.0.0:10908"
181181
- "--label=receive_replica=\"0\""
182182
- "--label=receive_cluster=\"java-tron-mainnet\""
183-
- "--objstore.config-file=/receive/bucket_storage_bucket.yml"
183+
- "--objstore.config-file=/receive/bucket_storage.yml"
184184
```
185185
#### Key configuration elements:
186186
##### 1. Storage configuration
@@ -189,7 +189,7 @@ Core configuration for Thanos Receive in [thanos-receive.yml](./docker-compose/t
189189
- Retention Policy: The `--tsdb.retention=30d` flag automatically purges data older than 30 days. Based on testing with a java-tron(v4.7.6+) FullNode using a 3-second metric scrape interval, storage consumption averages approximately **3GB of disk space per month**.
190190

191191
- External Storage:
192-
`../conf:/receive` mounts configuration files. The `--objstore.config-file` flag enables long-term storage in MinIO/S3-compatible buckets. In this case, it is [bucket_storage_bucket.yml](conf/bucket_storage_bucket.yml).
192+
`../conf:/receive` mounts configuration files. The `--objstore.config-file` flag enables long-term storage in MinIO/S3-compatible buckets. In this case, it is [bucket_storage.yml](conf/bucket_storage.yml).
193193
- Thanos Receive uploads TSDB blocks to an object storage bucket every 2 hours by default.
194194
- Fallback Behavior: Omitting this flag keeps data local-only.
195195

@@ -233,12 +233,12 @@ Core configuration in [thanos-store.yml](./docker-compose/thanos-store.yml):
233233
thanos_store:
234234
command:
235235
- "store"
236-
- "--objstore.config-file=/etc/thanos/bucket_storage_bucket.yml"
236+
- "--objstore.config-file=/etc/thanos/bucket_storage.yml"
237237
- "--grpc-address=0.0.0.0:10912"
238238
```
239239
The Store gateway:
240240

241-
- Connects to our Minio bucket via `bucket_storage_bucket.yml`, the same configuration file as Thanos Receive.
241+
- Connects to our Minio bucket via `bucket_storage.yml`, the same configuration file as Thanos Receive.
242242
- Exposes gRPC endpoint for Thanos Query to access historical data
243243
- Indexes object storage blocks for fast lookups
244244

@@ -263,7 +263,7 @@ ts=2025-04-03T05:37:53.676072548Z caller=intrumentation.go:56 level=info msg="ch
263263
ts=2025-04-03T05:37:53.676288048Z caller=tls_config.go:274 level=info service=http/server component=query msg="Listening on" address=[::]:9091
264264
ts=2025-04-03T05:37:53.676313173Z caller=tls_config.go:277 level=info service=http/server component=query msg="TLS is disabled." http2=false address=[::]:9091
265265
ts=2025-04-03T05:37:53.676380298Z caller=grpc.go:131 level=info service=gRPC/server component=query msg="listening for serving gRPC" address=0.0.0.0:10901
266-
ts=2025-04-03T05:37:58.685901342Z caller=endpointset.go:425 level=info component=endpointset msg="adding new receive with [storeEndpoints exemplarsAPI]" address=thanos-receive-0:10907 extLset="{receive_cluster=\"java-tron-mainnet\", receive_replica=\"0\", tenant_id=\"default-tenant\"}"
266+
ts=2025-04-03T05:37:58.685901342Z caller=endpointset.go:425 level=info component=endpointset msg="adding new receive with [storeEndpoints exemplarsAPI]" address=thanos-receive:10907 extLset="{receive_cluster=\"java-tron-mainnet\", receive_replica=\"0\", tenant_id=\"default-tenant\"}"
267267
ts=2025-04-03T05:37:58.685969217Z caller=endpointset.go:425 level=info component=endpointset msg="adding new store with [storeEndpoints]" address=thanos-store:10912 extLset="{receive_cluster=\"java-tron-mainnet\", receive_replica=\"0\", tenant_id=\"default-tenant\"}"
268268
...
269269
```
@@ -279,7 +279,7 @@ Below are the core configurations for the Thanos Query service:
279279
- --endpoint.info-timeout=30s
280280
- --http-address=0.0.0.0:9091
281281
- --query.replica-label=receive_replica # Deduplication turned on for metric with the same replica_label
282-
- --endpoint=thanos-receive-0:10907 # The grpc-address of the Thanos Receive service,if Receive run remotely replace container name "thanos-receive" with the real ip, could add multiple receive services
282+
- --endpoint=thanos-receive:10907 # The grpc-address of the Thanos Receive service,if Receive run remotely replace container name "thanos-receive" with the real ip, could add multiple receive services
283283
- --store=thanos-store:10907 # for historical data query
284284
```
285285
It will set up the Thanos Query service
File renamed without changes.

metric_monitor/conf/prometheus-remote-write.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ scrape_configs:
2929
# The remote_write configuration tells Prometheus to continuously write metrics to the Thanos Receive service.
3030
# Refer https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
3131
remote_write:
32-
- url: http://thanos-receive-0:10908/api/v1/receive # if Thanos Receive service run on the same host with Prometheus
32+
- url: http://thanos-receive:10908/api/v1/receive # if Thanos Receive service run on the same host with Prometheus
3333
headers:
3434
X-Service-Group: "tron-fullnode-group1"
3535
remote_timeout: 15s

metric_monitor/docker-compose/thanos-querier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
- --endpoint.info-timeout=10s
1212
- --http-address=0.0.0.0:9091
1313
- --query.replica-label=receive_replica # Deduplication turned on for identical series except the replica label.
14-
- --endpoint=thanos-receive-0:10907
14+
- --endpoint=thanos-receive:10907
1515
#- --endpoint=thanos-receive-1:10907 # could add multiple receive services
1616
- --store=thanos-store:10912 # for historical data query
1717
restart: unless-stopped

metric_monitor/docker-compose/thanos-receive.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
thanos-receive:
44
image: quay.io/thanos/thanos:v0.33.0
55
user: root
6-
container_name: thanos-receive-0
6+
container_name: thanos-receive
77
volumes:
88
- ../receive-data-0:/receive/data
99
- ../conf:/receive
@@ -20,5 +20,5 @@ services:
2020
- "--remote-write.address=0.0.0.0:10908"
2121
- "--label=receive_replica=\"0\""
2222
- "--label=receive_cluster=\"java-tron-mainnet\""
23-
- "--objstore.config-file=/receive/bucket_storage_bucket.yml"
23+
- "--objstore.config-file=/receive/bucket_storage.yml"
2424
restart: unless-stopped

metric_monitor/docker-compose/thanos-store.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
command:
1414
- "store"
1515
- "--data-dir=/var/thanos/store"
16-
- "--objstore.config-file=/etc/thanos/bucket_storage_bucket.yml"
16+
- "--objstore.config-file=/etc/thanos/bucket_storage.yml"
1717
- "--http-address=0.0.0.0:10911"
1818
- "--grpc-address=0.0.0.0:10912"
1919
restart: unless-stopped

0 commit comments

Comments
 (0)