Mimir Tenants Demo in Laptop
Intro
Multi-tenant mode will enable you to physically separate metrics from sources into different folders and treat them independently one from another. This gives additional layer of isolation between different teams or orgs and additional flexibility to set retention period or other handling rules.
My system is running in Mac Air M1, Docker Desktop (k8s)
Install Helms
# Grafana Helm includes Mimir and Grafana
# use: grafana/mimir-distributed and grafana/grafana
#
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
Configure Mimir
Use minimal setup to run in the local Kubernetes cluster (Docker Desktop or Rancher Desktop).
K8s-Monitoring Self Monitoring
Intro
k8s-monitoring will deploy several Alloy components to collect signals from the Kubernetes cluster. Each Alloy components will expose own metrics in :12345/metrics. There is no scrape job enabled by default, so they are not sent together with other metrics. Here you have useful info about total number of sent metrics, logs, traces or total number of failed metrics, logs, traces.
Config
You can add scraper in the extraConfig section under your components.
Claude Usage Monitoring using built-in Otel Exporter
The documentation in the Claude AI website is clear and detailed so I will focus on the details needed to set up monitoring and clarify usage of additional attributes and labels for filtering.
Claude Usage Monitoring
Claude has a built-in OpenTelemetry exporter to expose usage metrics and logs. You can then use a Grafana dashboard to track cost and token usage per user, department, or any other criteria. It can be enabled and configured using environment variables or settings.json. In a corporate environment, settings.json can be predefined and locked.