Monitoring

Prometheus and Grafana

The Kubo gateway exposes Prometheus metrics at http://gateway:8000/metrics. Start the monitoring stack alongside the main services:

docker compose up -d prometheus grafana

Access the UIs (bound to localhost by default; use an SSH tunnel for remote servers):

To set up the Grafana data source:

  • Go to Connections ▸ Data Sources ▸ Add URL

  • Set URL http://prometheus:9090, name it prometheus

  • A dashboard is available here (forked from jamiew)

The default dashboard covers:

  • Number of peers: Total number of connected network peers per IPFS instance. sum(ipfs_p2p_peers_total{...}) by (instance)

  • Number of peerings: Total number of peers broken down by transport protocol. sum(ipfs_p2p_peers_total{...}) by (transport)

  • Wantlist length: Total number of blocks/files the IPFS node is actively trying to discover. ipfs_bitswap_wantlist_total{...}

  • Uptime: Total time the IPFS process has been running since it was started. time() - process_start_time_seconds{...}

  • Allocated memory: Memory currently allocated by the Go runtime in Megabytes. go_memstats_alloc_bytes{...} / 1024 / 1024

  • Goroutines: Number of active concurrent Go threads running in the background. go_goroutines{...}

  • Open FDs: Total number of open file descriptors on the host OS. process_open_fds{...}

  • GC duration: Rate of time the Go garbage collector spends pausing the application. irate(go_gc_duration_seconds_sum{...}[1m])

Docker Service Diagnostics

General container health:

docker compose ps -a    # containers status
docker stats            # live CPU/memory usage
docker system df -v     # disk usage (-v for per-image breakdown)

Postgres:

docker compose exec db bash                       # db container shell
docker compose exec db psql -U odoo -d postgres   # connect via Docker
psql -h 127.0.0.1 -p 5433 -U odoo -d postgres     # connect over network

Odoo interactive shell:

docker compose exec odoo /usr/bin/odoo shell -d postgres --db_host=db -r odoo -w odoo

Kubo / IPFS:

docker compose exec ipfs ipfs id                        # node id and status
docker compose exec ipfs ipfs stats bw                  # real-time bandwidth
docker compose exec ipfs ipfs pubsub peers test.topic   # gossip peers on a topic
docker compose exec ipfs ipfs pin ls                    # filestore contents