{"id":13581786,"url":"https://github.com/grafana/mixin-metrics","last_synced_at":"2025-10-01T18:32:12.632Z","repository":{"id":52296425,"uuid":"361013496","full_name":"grafana/mixin-metrics","owner":"grafana","description":"Extract prometheus metrics from dashboard JSON and rules YAML","archived":true,"fork":false,"pushed_at":"2021-08-11T23:20:40.000Z","size":103,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":131,"default_branch":"master","last_synced_at":"2024-10-28T03:15:52.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-23T21:51:53.000Z","updated_at":"2023-01-28T07:15:57.000Z","dependencies_parsed_at":"2022-08-28T09:11:49.946Z","dependency_job_id":null,"html_url":"https://github.com/grafana/mixin-metrics","commit_stats":null,"previous_names":["hjet/mixin-metrics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fmixin-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fmixin-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fmixin-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fmixin-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/mixin-metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234892715,"owners_count":18902907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:14.572Z","updated_at":"2025-10-01T18:32:07.257Z","avatar_url":"https://github.com/grafana.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n⚠️ **This project has been deprecated. Please see [cortextool analyse](https://github.com/grafana/cortex-tools#analyse) which provides the same features** ⚠️\n\n# mixin-metrics\n![License](https://img.shields.io/github/license/hjet/mixin-metrics?color=blue)\n\nExtract prometheus metrics from dashboard JSON and rules YAML.\n\n## Prerequisites\n- Go 1.16\n\n## Compile\n```\ngo build mixin-metrics.go\n```\n\n## Use\nParse rules configs in `DIR`\n```\nmixin-metrics --dir=DIR --out=\"metrics_out.json\" rules\n```\nReplace `DIR` with directory containing Prometheus rules YAML files. By default will save parsed metrics in `metrics_out.json`.\n\nParse dashboard JSON files in `DIR`\n```\nmixin-metrics --dir=DIR dash \n```\nSimilar to above. Parses Grafana dashboard JSON files.\n\nJoin and print parsed metrics in Prom relabel-config format\n```\nmixin-metrics --dir=DIR --print dash\n```\nUse this output with `relabel_config` to `drop` or `keep` needed metrics. See [Reducing Prometheus metrics usage with relabeling](https://grafana.com/docs/grafana-cloud/billing-and-usage/prometheus/usage-reduction/#reducing-prometheus-metrics-usage-with-relabeling) to learn more.\n\n## TODO\n- [ ] fail fast if parsing rules/dash with wrong flag\n- [ ] better docs\n- [ ] dashboard structs (no jq)\n- [ ] tests\n- [ ] binaries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fmixin-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fmixin-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fmixin-metrics/lists"}