← スキル一覧に戻る

grafana-billing
by nodnarbnitram
These are a collection of extension for Claude Code that can typically also be used in opencode.
⭐ 1🍴 1📅 2026年1月24日
SKILL.md
name: grafana-billing description: Query Prometheus and Loki billing metrics from Grafana. Use when discussing observability costs, active series, ingestion rates, storage usage, or cardinality analysis.
Grafana Billing Metrics Skill
Query key billing metrics from Prometheus and Loki through Grafana's data source proxy API.
Quick Start
# Query both staging and prod (default)
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py
# Query specific environment
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --env staging
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --env prod
# JSON output for automation
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --json
# Filter to specific service
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --service prometheus
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --service loki
Environment Variables Required
GRAFANA_STAGING_API_KEY- API key for staging Grafana workspaceGRAFANA_PROD_API_KEY- API key for prod Grafana workspace
Key Metrics Captured
Prometheus
| Metric | Description |
|---|---|
| Active Time Series | Current count of active series (billing dimension) |
| Samples/sec | Ingestion rate (DPM = samples/sec * 60) |
| TSDB Storage | On-disk storage bytes |
| Top Cardinality | Top 10 metrics by series count |
Loki
| Metric | Description |
|---|---|
| Ingestion Rate | GB/day being ingested |
| Total Bytes | Cumulative bytes received |
| Active Streams | Number of active log streams |
| Memory Chunks | Chunks held in memory |
When to Use
Use this skill when the user asks about:
- Observability billing or costs
- Active time series counts
- Prometheus cardinality analysis
- Loki ingestion rates
- Storage usage for metrics or logs
- Comparing staging vs production usage
Instructions for Claude
- Run the billing metrics script to gather current data
- Present the results in a clear, formatted way
- Highlight any concerning metrics (high cardinality, rapid growth)
- Compare staging vs prod if both are queried
- Suggest cost optimization if metrics are unusually high
Critical Rules
- Always check that API keys are set before running
- Use
--jsonflag when you need to process the output programmatically - Default to querying both environments for comparison
- Handle errors gracefully - missing data sources should not crash the script
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です