martabal/qbittorrent-exporter

Extreme timeserie leaks of the qbittorrent_torrent_info

Closed this issue · 1 comments

Hello,
first of all, I really like your exporter and specifically the fact of having per-torrent metrics !

However, during downloads I found some extreme prometheus timeseries leak for the qbittorrent_torrent_info.
This is because the labels dl_speed, ul_speed values are continuously changing on every scrape.
Screenshot 2024-09-27 at 17 59 26

This is not really good practice (prometheus guidelines), and I would advise to keep the qbittorrent_torrent_info labels to the one that are mostly static (aka, name, category, tracker, size, ...) while creating new metrics for all the moving values (progress, time left, etc..)

I understand it will drastically change your dashboard (the table part mostly) into multiple queries instead of one, but that would drastically help the prometheus querying and timeseries (and its memory usage).
Screenshot 2024-09-27 at 18 07 57

Thanks
Alban

Hello 👋

Indeed, this can be a huge problem for large instances. qbittorrent_torrent_info is only used for the table, I prefer to remove it completely by default. It can be re-enabled by setting the environment ENABLE_HIGH_CARDINALITY to true. I will see later if there is another way to reintroduce it properly