New advertisers: 50% off your first month with code FIRSTMONTHSee slots
ruvnet avatar

Cost Export

Exports cost-tracking telemetry as Prometheus textfile or webhook JSON for external dashboards.

skills.sh installs
681
GitHub stars
82.2K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers session and budget records from the cost-tracking namespace, emitted for Grafana, Datadog, and custom dashboards
  • Includes Prometheus metrics for total, per-tier (opus, sonnet, haiku), per-session, and budget utilization values
  • Supports a --prometheus <path> textfile output and a --webhook <url> POST with optional auth headers via EXPORT_WEBHOOK_HEADER
  • Designed for scheduled refreshes with /loop 5m or one-shot reporting to Slack and custom endpoints

Install

$ npx -y skills add ruvnet/ruflo --skill cost-export -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Cost Export

Pulls every session-* and budget-config-* record from cost-tracking and emits in formats consumable by external observability systems. Without this, cost data lives only inside the AgentDB namespace; with it, the same data lights up dashboards.

When to use

  • After any cost-track run, to refresh metrics for Grafana / Datadog / Prometheus.
  • Cron-friendly via /loop 5m to keep external dashboards near-real-time.
  • One-shot to a webhook for ad-hoc reporting (Slack, custom endpoint).

Steps

  1. Pick a format — textfile collector for Prometheus / Grafana, or webhook POST for everything else:

    # Prometheus node_exporter textfile collector
    node plugins/ruflo-cost-tracker/scripts/export.mjs --prometheus /var/lib/node_exporter/textfile_collector/cost_tracker.prom
    
    # Webhook (POSTs JSON; add auth via env)
    EXPORT_WEBHOOK_HEADER='Authorization: Bearer $TOKEN' \
      node plugins/ruflo-cost-tracker/scripts/export.mjs --webhook https://hooks.example.com/cost-tracker
    
    # Stdout JSON (default if no flag)
    node plugins/ruflo-cost-tracker/scripts/export.mjs
    
  2. Inspect what's emitted — Prometheus output includes:

Details

Repository
github.com/ruvnet/ruflo
Categories
DevOps & Cloud, Agent Workflow & Planning
First seen
Jun 3, 2026

More from ruvnet/ruflo

All 236

Similar to Cost Export

More DevOps & Cloud