{"repo":"dominikhei/cardamon","free":true,"listed":false,"github":"https://github.com/dominikhei/cardamon","clone":"git clone https://github.com/dominikhei/cardamon.git","description":"Cardamon is a cleanup tool for Prometheus that collects unused metrics from Grafana and Prometheus and generates drop statements for them.","language":"Go","stars":130,"topics":["cardinality","metrics","observability","prometheus","sre","storage-optimization"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"Cardamon Cardamon is a metric auditor for Prometheus. It identifies metrics that exist in your TSDB but are never actually queried by dashboards, alerting rules, recording rules, or any other consumer. The idea is to generate insight into that not to blindly drop all metrics as they might be valuable during an incident. Demo What is an Unused Metric? An unused metric is a metric that Prometheus scrapes and stores, but that nothing ever reads. It occupies memory, disk, and ingestion budget without providing value. At scale, such metrics can account for a significant portion of your total series count. Cardamon cross-references every metric in your TSDB against: - Prometheus query logs Every PromQL expression evaluated over a configurable lookback window - Prometheus alerting & recording rules All rule expressions in your Prometheus - Grafana dashboards Every metric across all dashboards in your Grafana instance Any metric not found in any of those sources is flagged as unused. --- Installing cardamon You can clone the repo and install cardamon from source or simply run: --- How It Works 1. Cardamon fetches all metric names from Prometheus using the label values API. 2. It collects the set of metrics that are actively used from three sources: the Prometheus query log, the rules API, and Grafana dashboard JSON. 3. Based on the Overlap with (1) Cardamon identifies actual metrics from (2). 4. The difference between (1) and (3) is your unused metric set. 5. For each unused metric, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/dominikhei","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dominikhei/cardamon/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}