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.
/loop 5m to keep external dashboards near-real-time.```bash
node plugins/ruflo-cost-tracker/scripts/export.mjs --prometheus /var/lib/nodeexporter/textfilecollector/cost_tracker.prom
EXPORTWEBHOOKHEADER='Authorization: Bearer $TOKEN' \
node plugins/ruflo-cost-tracker/scripts/export.mjs --webhook https://hooks.example.com/cost-tracker
node plugins/ruflo-cost-tracker/scripts/export.mjs
```
```
costtrackertotal_usd
costtrackertiertotalusd{tier="opus|sonnet|haiku"}
costtrackersessiontotalusd{session="<8-char>"}
costtrackersession_messages{session="<8-char>"}
costtrackerbudget_usd
costtrackerbudget_utilization
```
{ exportedAt, sessions: [...], budget, totalUsd, byTier }. Headers may be added via EXPORT_WEBHOOK_HEADER='K1: V1, K2: V2' (comma-separated).| Env | Default | Purpose |
|---|---|---|
EXPORT_NAMESPACE | cost-tracking | Override target namespace |
EXPORT_WEBHOOK_HEADER | unset | Comma-separated K: V pairs for webhook auth |
EXPORT_QUIET=1 | unset | Suppress non-error confirmation output |
cost-track — produces the data this skill exportscost-budget-check — the same cost_tracker_budget_* metrics are alertable in Prometheus.prom file in the collector directory and Prometheus picks it up