Skip to content

Commit 5cd3a54

Browse files
authored
Merge pull request #78 from mrd0ll4r/docker-compose-new-bitswap-monitor
docker-compose: update for new bitswap monitoring client
2 parents 0563d95 + 63483e5 commit 5cd3a54

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docker-compose/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Because GeoIPUpdate updates the GeoIP databases regularly, you'd need to restart
9292
It's unclear how often geolocation data changes and how necessary this is.
9393
The client is stateless, so restarting it should have minimal impact on the metrics.
9494

95+
The client can log messages to disk.
96+
For this, uncomment the `disk_logging_directory` field in the [monitoring_client_config.yaml](monitoring_client_config.yaml) configuration file.
97+
Also, mount the logging directory by uncommenting the `traces` mount in the `docker-compose.yml` file.
98+
The client changes ownership of the logging directory and log files to the values of `PUID` and `PGID`, configured via environment variables.
99+
95100
### Monitoring Size Estimator
96101

97102
This is the [monitoring-size-estimator](https://github.com/trudi-group/ipfs-tools/tree/master/monitoring-size-estimator).

docker-compose/docker-compose.yml

+7
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,21 @@ services:
9595

9696
monitoring-client:
9797
image: "bitswap-monitoring-client:latest"
98+
command:
99+
- "--config"
100+
- "./config/bitswap-monitoring-client-config.yaml"
98101
restart: unless-stopped
99102
expose:
100103
- 8088
101104
volumes:
102105
- ./monitoring_client_config.yaml:/ipfs-tools/config/bitswap-monitoring-client-config.yaml
103106
- geoip_data:/geoip
107+
# Optional, if logging to disk is enabled in the config:
108+
#- ./traces:/traces
104109
environment:
105110
- RUST_LOG=info
111+
- PUID=1000
112+
- PGID=1000
106113
links:
107114
- rabbitmq
108115
- prometheus

docker-compose/monitoring_client_config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ geoip_database_path: "/geoip"
1313
# Defaults to empty, i.e., no tagging of gateway traffic.
1414
#gateway_file_path: "/usr/local/share/gateways.txt"
1515

16+
# Specifies a path to a directory to write JSON logs.
17+
# A subdirectory per monitor will be created.
18+
# If not provided, logging to disk will be disabled.
19+
#disk_logging_directory: "/traces"
20+
1621
# List of AMQP data sources to connect to.
1722
amqp_servers:
1823
# Address of the AMQP server, using amqp or amqps (TLS transport) scheme.

0 commit comments

Comments
 (0)