billing-health
Monitor OpenMeter billing pipeline: outbox health, per-org usage, dead letter recovery, and anomaly detection
- License 许可
- MIT
- 最近更新
- 2026-03-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- billing-health
- requires
- { "mcps": [ "supabase" ] }
- description
- Monitor OpenMeter billing pipeline: outbox health, per-org usage, dead letter recovery, and anomaly detection
02 资源文件 4
- 参考文档references/anomaly-detection.md1.9 KB
- 参考文档references/outbox-queries.md1.7 KB
- 参考文档references/thresholds.md1.2 KB
- 参考文档references/usage-queries.md1.1 KB
03 SKILL.md 正文
Billing Health
Monitor the OpenMeter metering pipeline using Supabase MCP for direct SQL queries against the outbox ledger.
Prerequisites
- Supabase MCP:
execute_sqltool - Database access to the
openmeter_event_ledgertable
Monitoring Procedures
1. Outbox Health Check
Use Supabase MCP execute_sql with this query to assess queue health:
SELECT
COUNT(*) FILTER (WHERE sent_at IS NULL AND attempts < 10) AS pending,
COUNT(*) FILTER (WHERE sent_at IS NOT NULL) AS sent,
COUNT(*) FILTER (WHERE attempts >= 10) AS dead_letter,
COUNT(*) FILTER (WHERE lease_until IS NOT NULL AND lease_until > now()) AS leased,
COUNT(*) AS total
FROM openmeter_event_ledger
WHERE created_at > now() - interval '24 hours'
See references/outbox-queries.md for all outbox queries.
Interpret results using references/thresholds.md:
pending > 500→ HIGH QUEUE DEPTHdead_letter > 0→ DEAD LETTERS — events failed 10+ times- Stuck leases (expired but unsent) → outbox worker may be down
sent = 0withtotal > 0→ NO EVENTS DELIVERED — check API connectivity
2. Per-Org Usage Breakdown
See references/usage-queries.md for SQL queries that break down usage by org, provider, and model.
3. Dead Letter Recovery
When dead letters exist, retry them with this procedure:
- Check the top errors first (see outbox-queries.md "Top Errors" query)
- Fix the root cause (usually API key, timeout, or connectivity)
- Run the retry query (see outbox-queries.md "Dead Letter Retry" query)
- Re-check outbox health to verify events are being delivered
4. Usage Anomaly Detection
See references/anomaly-detection.md for the spike/drop detection algorithm.
04 同仓库更多 Skills
lucid-PLUGIN_NAME
PLUGIN_DESCRIPTION
social-content
Generate short-form video content optimized for social media platforms
personalized-outreach
Generate 1:1 personalized video for sales prospecting and customer success
data-reports
Generate animated data report videos from KPIs, charts, and analytics
lucid-video
Agent-native video generation using Remotion — MCP server + OpenClaw plugin
lucid-veille
Content monitoring, AI digest generation, and multi-platform auto-publishing