Prometheus Metrics
Prometheus metrics can be enabled to monitor your qBittorrent instances. When enabled, metrics are served on a separate port (default: 9074) with no authentication required for easier monitoring setup.
Enable Metrics
Metrics are disabled by default. Enable them via configuration file or environment variable:
Config File (config.toml)
metricsEnabled = true
metricsHost = "127.0.0.1" # Bind to localhost only (recommended for security)
metricsPort = 9074 # Standard Prometheus port range
# metricsBasicAuthUsers = "user:$2y$10$bcrypt_hash_here" # Optional: basic auth
Environment Variables
QUI__METRICS_ENABLED=true
QUI__METRICS_HOST=0.0.0.0 # Optional: bind to all interfaces if needed
QUI__METRICS_PORT=9074 # Optional: custom port
QUI__METRICS_BASIC_AUTH_USERS="user:$2y$10$hash" # Optional: basic auth
Available Metrics
- Torrent counts by status (downloading, seeding, paused, error)
- Transfer speeds (upload/download bytes per second)
- Instance connection status
Prometheus Configuration
Configure Prometheus to scrape the dedicated metrics port (no authentication required):
scrape_configs:
- job_name: 'qui'
static_configs:
- targets: ['localhost:9074']
metrics_path: /metrics
scrape_interval: 30s
#basic_auth:
#username: prometheus
#password: yourpassword
All metrics are labeled with instance_id and instance_name for multi-instance monitoring.