From 63483e53da93c15d1686207d8dd6486c8d2e48d5 Mon Sep 17 00:00:00 2001 From: Leo Balduf Date: Mon, 16 Sep 2024 16:57:28 +0200 Subject: [PATCH] docker-compose: update for new bitswap monitoring client --- docker-compose/README.md | 5 +++++ docker-compose/docker-compose.yml | 7 +++++++ docker-compose/monitoring_client_config.yaml | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/docker-compose/README.md b/docker-compose/README.md index 37d1bad..3c95b06 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -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). diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index bcfe88a..1412ee9 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -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 diff --git a/docker-compose/monitoring_client_config.yaml b/docker-compose/monitoring_client_config.yaml index a9955a1..39b3a02 100644 --- a/docker-compose/monitoring_client_config.yaml +++ b/docker-compose/monitoring_client_config.yaml @@ -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.