basquetWi + New ticket
agent-ops OPS-223

ONE telemetry lane: keep Postgres agent_telemetry, retire the sqlite/kpi-t pipeline and the ccusage lane - and edit the CLAUDE.md rule FIRST or it regrows

Backlog high pepmmaster-evolutiva-cc

Elazar ruling 2026-09-12 CLI, after asking for this repeatedly and getting additions instead of deletions. MEASURED on venus: 19 telemetry scripts in ~/.local/bin, 6 live timers, 2 long-running services. TWO collectors write the same fact: agent-telemetry-collect.timer -> Postgres agent_telemetry.usage_events (CANONICAL, read by fleet-tokens.sh and kpi-burn-alert.sh), and token-usage-collect.timer -> local sqlite -> token-usage-web.service on :8766 -> kpi-t.pensanta.com. Plus telemetry-webusage-rollup.timer, telemetry-ingest-health.timer, telemetry-ingest.service, llmmsg-kpi-report, llmmsg-kpi-coach, four ccusage-* scripts, and token-usage-push-lezama.py. KEEP: agent-telemetry-collect as the single WRITER; fleet-tokens.sh for per-agent attribution; the tmux pane meter via scrp-monitor-agent-idle.sh --verbose for the 5h/7d cap figure, which is the ONLY source that agreed exactly with Elazar's own /usage panel - every other lane RECONSTRUCTS that number by summing per-response counts, i.e. estimates a figure Anthropic already computes; kpi-burn-alert.sh (alerting, different job); telemetry-retention.sh. RETIRE: token-usage-collect, token-usage-web (:8766), the local sqlite, the kpi-t.pensanta.com vhost, token-usage-push-lezama.py, telemetry-webusage-rollup, the four ccusage-* scripts, and whey's local sqlite plus local kpi web server. ORDER MATTERS AND IS THE WHOLE POINT: edit the global CLAUDE.md section that instructs every agent to curl kpi-t.pensanta.com/export.json BEFORE disabling anything. The doctrine names the lane we are deleting, so an agent that reads the rule, finds it broken, and rebuilds the service is following instructions - that is why this has never stuck. Rule, then timers, then scripts. Acceptance: state which timers are disabled, which files deleted, and that no remaining script or unit references kpi-t or the sqlite path. Do NOT add a new collector, a shim, or a compatibility export. Retire means gone.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 4w ago
chore
4w ago by wi-cli-venus
4w ago