* feat(obs): add drive topology detail metrics Expose additive drive info, topology, state, and per-drive API metrics while preserving the existing drive metric label sets. Backlog: rustfs/backlog#1655 Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): preserve suspect drive runtime state Keep suspect as a bounded drive runtime state and avoid all-zero runtime_state samples for that storage health state. Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): skip unknown drive inode samples Avoid exporting zero inode gauges for missing or stale drive snapshots and ignore zero-count API latency buckets. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add scanner source work detail metrics Expose additive scanner source and cycle work metrics with bounded server/source/state labels while leaving the existing aggregate scanner metrics unchanged. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add ilm action detail metrics Expose additive ILM action/state task metrics with a server label while preserving the existing aggregate ILM series. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add delivery target server metrics Expose additive audit and notification delivery target metrics with server labels and extend removed-target tombstones for the server-aware series. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add replication target flow metrics Expose additive bucket replication target sent and failed-flow metrics while preserving existing bucket aggregates and target backlog series. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add request server metrics Expose additive API request metrics with server labels while preserving the existing request and traffic metric label sets. Co-Authored-By: heihutu <heihutu@gmail.com> * style(obs): apply rustfmt to metrics changes Apply rustfmt output to the metrics dimension changes without altering behavior. Co-Authored-By: heihutu <heihutu@gmail.com> * style(obs): reuse audit target label constant Use the exported audit target_id label constant for legacy audit target metrics. Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): populate drive disk metrics Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add scanner bucket drive result metrics Co-Authored-By: heihutu <heihutu@gmail.com> * feat(obs): add replication proxy server metrics Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): address metric liveness review Use checked division for drive API latency aggregation and keep recovered drive, scanner current-cycle, replication flow, audit target, and notification target series from retaining stale values. Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): address metric dimension review Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): address additional metric review Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): count drive calls at start Co-Authored-By: heihutu <heihutu@gmail.com> * fix(obs): address metrics dimension review Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): address dimension review gaps Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): address scanner review follow-ups Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): address runtime review follow-ups Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): reduce disk metric contention Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): address runtime review follow-ups Co-Authored-By: heihutu <heihutu@gmail.com> * fix(metrics): retire stale dimension series Co-Authored-By: heihutu <heihutu@gmail.com> --------- Co-authored-by: heihutu <heihutu@gmail.com>
RustFS Docker Infrastructure
This directory contains the complete Docker infrastructure for building, deploying, and monitoring RustFS. It provides ready-to-use configurations for development, testing, and production-grade observability.
📂 Directory Structure
| Directory | Description | Status |
|---|---|---|
observability/ |
[RECOMMENDED] Full-stack observability (Prometheus, Grafana, Tempo, Loki). | ✅ Production-Ready |
compose/ |
Specialized setups (e.g., 4-node distributed cluster testing). | ⚠️ Testing Only |
mqtt/ |
EMQX Broker configuration for MQTT integration testing. | 🧪 Development |
openobserve-otel/ |
Alternative lightweight observability stack using OpenObserve. | 🔄 Alternative |
📄 Root Directory Files
The following files in the project root are essential for Docker operations:
Build Scripts & Dockerfiles
| File | Description | Usage |
|---|---|---|
docker-buildx.sh |
Multi-Arch Build Script Automates building and pushing Docker images for amd64 and arm64. Supports release and dev channels. |
./docker-buildx.sh --push |
Dockerfile |
Production Image (Alpine) Lightweight image using musl libc. Downloads pre-built binaries from GitHub Releases. |
docker build -t rustfs:latest . |
Dockerfile.glibc |
Production Image (Ubuntu) Standard image using glibc. Useful if you need specific dynamic libraries. |
docker build -f Dockerfile.glibc . |
Dockerfile.source |
Development Image Builds RustFS from source code. Includes build tools. Ideal for local development and CI. |
docker build -f Dockerfile.source . |
Docker Compose Configurations
| File | Description | Usage |
|---|---|---|
docker-compose.yml |
Main Development Setup Comprehensive setup with profiles for development, observability, and proxying. |
docker compose up -ddocker compose --profile observability up -d |
docker-compose-simple.yml |
Quick Start Setup Minimal configuration running a single RustFS instance with 4 volumes. Perfect for first-time users. |
docker compose -f docker-compose-simple.yml up -d |
🌟 Observability Stack (Recommended)
Located in: .docker/observability/
We provide a comprehensive, industry-standard observability stack designed for deep insights into RustFS performance. This is the recommended setup for both development and production monitoring.
Components
- Metrics: Prometheus (Collection) + Grafana (Visualization)
- Traces: Tempo (Storage) + Jaeger (UI)
- Logs: Loki
- Ingestion: OpenTelemetry Collector
Key Features
- Full Persistence: All metrics, logs, and traces are saved to Docker volumes, ensuring no data loss on restarts.
- Correlation: Seamlessly jump between Logs, Traces, and Metrics in Grafana.
- High Performance: Optimized configurations for batching, compression, and memory management.
Quick Start
cd .docker/observability
docker compose up -d
🧪 Specialized Environments
Located in: .docker/compose/
These configurations are tailored for specific testing scenarios that require complex topologies.
Distributed Cluster (4-Nodes)
Simulates a real-world distributed environment with 4 RustFS nodes running locally.
docker compose -f .docker/compose/docker-compose.cluster.yaml up -d
Integrated Observability Test
A self-contained environment running 4 RustFS nodes alongside the full observability stack. Useful for end-to-end testing of telemetry.
docker compose -f .docker/compose/docker-compose.observability.yaml up -d
📡 MQTT Integration
Located in: .docker/mqtt/
Provides an EMQX broker for testing RustFS MQTT features.
Quick Start
cd .docker/mqtt
docker compose up -d
- Dashboard: http://localhost:18083 (Default:
admin/public) - MQTT Port:
1883
👁️ Alternative: OpenObserve
Located in: .docker/openobserve-otel/
For users preferring a lightweight, all-in-one solution, we support OpenObserve. It combines logs, metrics, and traces into a single binary and UI.
Quick Start
cd .docker/openobserve-otel
docker compose up -d
🔧 Common Operations
Cleaning Up
To stop all containers and remove volumes (WARNING: deletes all persisted data):
docker compose down -v
Viewing Logs
To follow logs for a specific service:
docker compose logs -f [service_name]
Checking Status
To see the status of all running containers:
docker compose ps