Reduce Prometheus memory usage when scraping Node metrics

I had a look at my Prometheus time series database stats and noticed that the version_accumulator label from the nodeinfo metric has the highest cardinality by a significant margin. This is because the value changes every single metrics scrape. It also has the highest memory usage compared to the second highest label (x15 more). You can read about why high cardinality labels are bad at this link:

https://www.robustperception.io/cardinality-is-key

Here’s the snippet I added to radix metrics job in prometheus.yml to drop the version_accumulator from being added to the time series database:

    metric_relabel_configs:
      - regex: version_accumulator
        action: labeldrop
1 Like