Finding unused metrics in Coralogix

It’s really easy to install a few neat utilities onto your cluster and not-notice that they export a load of metrics by default. Istio is the one that comes up most-days for this, Cilium and Consul are also common.

When trying to optimise a Coralogix team, it’s useful to grab a list of every metric that is sent to the team, and compare this with the list of every metric that is used by the team (all alerts, dashboards, recording rules, SLOs).

Rather than doing this manually, I made coralogix-unused-metrics-finder

Or, more accurately, I asked Claude to - this is also my first experiment with vibe coding; the whole thing was

It lists every metric series in the account, then reads every dashboard, alert and SLO to see which of them anything actually queries.

Whatever’s left over is unused and can be dropped at the collector; it writes out an OTel collector ocnfig snippet to do this.

It also produces a PDF summary that you can use to understand the changes. It’s cautious: if it can’t tell whether a metric is used, it doesn’t call it unused, so nothing gets dropped on a guess.

The README has the details: API key permissions, flags, and what’s in each output file.

There’s a webui included as well, which is hosted on Cuban Yetis, but it’s worth noting that it can take a lot of memory to process a reasonable-sized team and my limits are set low!