Koz Software

Work · Product · In active development

obscost

Cost allocation for self-hosted Grafana Mimir. It tells platform teams which tenants and which rules are using their shared metrics infrastructure, from what the cluster actually measured rather than estimates.

Grafana Mimir · Prometheus · Go · FinOps

The problem

A shared metrics platform tends to grow the same way. A central team runs Mimir (or Cortex, or a large Prometheus estate) for dozens of teams. Ingesters multiply, the ruler falls behind, and the bill grows. When someone asks who is using all this?, the honest answer is usually a guess.

What obscost does

obscost answers that question with evidence. Its command-line tool, promcost, reads what Mimir already knows about itself and splits the platform’s resources across the tenants using them:

  • Tenant showback. It splits ingester memory by each tenant’s active series. A result reads like “analytics uses 62.6% of ingester memory, the equivalent of 5.0 of your 8 ingesters”. If you give it a price, it adds the cost.
  • Rule workload attribution. It joins the ruler’s own query statistics with the rule definitions, so you can see which recording and alerting rules drive each tenant’s query load.
  • No invented numbers. If a source never measured something, the report says “not measured” instead of showing 0. Every figure comes with the assumptions and queries behind it.

What it looks like

This is the tenant showback report, taken from obscost’s own test suite:

analytics uses 62.6% of ingester memory
— the equivalent of 5.0 of your 8 ingesters.

Tenant      Share    ≈ ingesters
analytics   62.6%    5.01
infra       32.3%    2.59
payments     5.0%    0.40
platform    not measured

Why I’m building it

Most of my work has been on shared observability platforms, where the hardest conversations are about attribution. You can’t ask a team to fix a recording rule, drop a label or pay for its share until you can show them the numbers. obscost is the tool I kept wishing I had.

Status

promcost report (workload attribution) and promcost cost (tenant showback for ingester memory) work today and are tested against a live multi-tenant Mimir rig. Next on the roadmap: cost for the remaining Mimir components, comparing periods, and mapping tenants to teams. The design decisions are written up as ADRs in the repository.

If you run Mimir for more than a handful of teams and want to see it on your own cluster, book a demo.