Skip to content

Commit

Permalink
docker-compose: update for new bitswap monitoring client
Browse files Browse the repository at this point in the history
  • Loading branch information
mrd0ll4r committed Sep 16, 2024
1 parent 0563d95 commit 63483e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ Because GeoIPUpdate updates the GeoIP databases regularly, you'd need to restart
It's unclear how often geolocation data changes and how necessary this is.
The client is stateless, so restarting it should have minimal impact on the metrics.

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

### Monitoring Size Estimator

This is the [monitoring-size-estimator](https://github.com/trudi-group/ipfs-tools/tree/master/monitoring-size-estimator).
Expand Down
7 changes: 7 additions & 0 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,21 @@ services:

monitoring-client:
image: "bitswap-monitoring-client:latest"
command:
- "--config"
- "./config/bitswap-monitoring-client-config.yaml"
restart: unless-stopped
expose:
- 8088
volumes:
- ./monitoring_client_config.yaml:/ipfs-tools/config/bitswap-monitoring-client-config.yaml
- geoip_data:/geoip
# Optional, if logging to disk is enabled in the config:
#- ./traces:/traces
environment:
- RUST_LOG=info
- PUID=1000
- PGID=1000
links:
- rabbitmq
- prometheus
Expand Down
5 changes: 5 additions & 0 deletions docker-compose/monitoring_client_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ geoip_database_path: "/geoip"
# Defaults to empty, i.e., no tagging of gateway traffic.
#gateway_file_path: "/usr/local/share/gateways.txt"

# Specifies a path to a directory to write JSON logs.
# A subdirectory per monitor will be created.
# If not provided, logging to disk will be disabled.
#disk_logging_directory: "/traces"

# List of AMQP data sources to connect to.
amqp_servers:
# Address of the AMQP server, using amqp or amqps (TLS transport) scheme.
Expand Down

0 comments on commit 63483e5

Please sign in to comment.