Rclone Exporter

A Prometheus exporter for rclone, designed to monitor the size, object count, and other metrics of your configured rclone remote(s).
π Features
- Remote Size & Object Count: Exposes
rclone_remote_size_bytes and rclone_remote_objects_count.
- Probe Metrics: Includes
rclone_probe_success and rclone_probe_duration_seconds.
- Container-Ready: Includes a
Dockerfile.
π¦ Getting Started
Prerequisites
- Go (1.24+): To build from source.
- rclone: Must be installed and configured (
rclone.conf) on the host running the exporter.
- Prometheus: To scrape metrics.
Installation
1. Build from Source
git clone https://github.com/crazyuploader/rclone_exporter.git
cd rclone_exporter
go build -o rclone_exporter ./cmd/rclone_exporter
2. Running the Exporter
./rclone_exporter --web.listen-address=":9116"
You can run the exporter as a systemd service using the unit file provided in the contrib/systemd directory.
Or with Docker:
docker build -t rclone_exporter .
docker run -v ~/.config/rclone:/root/.config/rclone:ro -p 9116:9116 rclone_exporter
Verify at http://localhost:9116/metrics and http://localhost:9116/probe?remote=YOUR_REMOTE_NAME.
π Prometheus Configuration Example
Configure Prometheus to scrape the exporter using the metrics_path: /probe and relabel_configs to pass the remote name.
# prometheus.yml
scrape_configs:
- job_name: "rclone_exporter"
metrics_path: /probe
scrape_interval: 300s
params:
module: [rclone_size_probe] # Optional
static_configs:
- targets:
- "gdrive:"
- "s3bucket:"
- "dropbox:"
relabel_configs:
- source_labels: [__address__]
target_label: __param_remote
- source_labels: [__param_remote]
target_label: instance
- target_label: __address__
replacement: "rclone_exporter:9116" # Replace with your exporter's host:port
ποΈ Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
π License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.