qbittorrent-exporter
qbittorrent-exporter copied to clipboard
Cardinality problem of `qbittorrent_torrent_info`
Metric qbittorrent_torrent_info
exposes dynamically changing labels. This is a problem because each labelset is an additional time series: https://prometheus.io/docs/practices/instrumentation/#do-not-overuse-labels
Labels like progress
, dl_speed
, up_speed
, downloaded
are frequently changing, and basically result in a creation of new time series for each name on every scrape.
Since all of these labels are exposed as proper values in other metrics, I'd argue this metric is not needed at all.
But if you'd like to keep it for compatibility (or any other) reasons, I suggest making this metric optional.
To prevent cardinality explosion, this metric can be dropped on relabeling with configuration like this:
- job_name: 'qbittorrent'
static_configs:
- targets: ['qbittorrent-exporter:17871']
metric_relabel_configs:
- source_labels: [__name__]
regex: 'qbittorrent_torrent_info'
action: drop