kpi
KPI-15
· child of KPI-1 Fleet inventory: every token/context/llmmsg-srv script, monitor, service each agent owns/knows Backlog
ccusage-daily-kpi.sh + timer (whey, system scope, daily 08:00) - token usage KPI collector
Canceled normal
bwbin-whey-cc
Armed on whey, SYSTEM scope: ccusage-daily-kpi.timer -> ccusage-daily-kpi.service, daily 08:00 ART, last run 2026-08-22 08:00. Script ~/.local/bin/ccusage-daily-kpi.sh v1.0, 2 commits, unchanged since 2026-06-06. Reads ccusage output, writes a daily token KPI. Named in ONEDB-9 as one of the 5 sqlite readers to be repointed at the pg telemetry_ro views. OVERLAP TO CHECK: bin-venus-cc token-usage-collect.sh and the venus kpi.pensanta.com token-usage app both collect token usage; whether this whey timer duplicates them or covers a host they do not reach is exactly the question this epic exists to answer - I have not measured it and am not asserting either way.
Activity
-
parent=#2960
-
REPOINT PENDING A CREDENTIAL, and the source it was reading is retired. Chain of findings 2026-08-23: - pg usage.daily is RETIRED, not broken. Its writer chain (ccusage-watch.sh -> ccusage-snapshot.sh) has no systemd unit, timer or cron anywhere on venus and calls `ccusage daily -j -b -i`, flags that no longer exist in ccusage 11.15.0. It still HOLDS rows through 2026-08-17, which is precisely why it kept reading as live to a consumer. Retired tables that retain data are worse than dropped ones. - I reported this as a six-day outage. Wrong diagnosis from a right observation: absence of rows does not distinguish "writer died" from "writer retired", and I inferred the first without checking whether the pipeline still existed. - SSOT ruled by nw-venus-cc: token-usage.sqlite (venus-local, token-usage-collect.sh, 15min, registry row 23). Transport ruled HTTP - https://kpi.pensanta.com/export.json, JSON, behind Caddy basic_auth. I declined /resource for the raw sqlite: it is written every 15 minutes, and a plain cp of a live WAL-mode file returns the last checkpoint with committed rows still in the sidecar, so I would have swapped a table frozen on 08-17 for a file that silently lags - a worse defect, because the dates keep moving. - BLOCKED ON: the basic_auth credential. Every route returns 401 from whey; nw-venus-cc holds only the bcrypt hash (Elazars own login) and has escalated the service-credential decision to Elazar. Gate is behaving correctly - the fix is a credential for the calling path, not a relaxation of the auth. MEASUREMENT WORTH KEEPING FOR THIS EPIC: from outside, https://kpi.pensanta.com/export.json and a deliberately bogus route BOTH return 401. Caddy authenticates in front of routing, so an external prober cannot distinguish an existing route from one that does not exist - a 401 says the vhost is up and says NOTHING about the application behind it. nw-venus-cc settled it the only way available, by curling 127.0.0.1:8766/export.json ON venus (200, application/json). Any claim in this epic about what a remote endpoint serves must be made from ON the host, never from a 401 elsewhere. INTERIM STATE IS HONEST: ccusage-daily-kpi.sh v1.2 now prints NO DATA with the freshness it measured instead of a top-3 table with one blank row.
-
claude-usage-watch.service no longer fails: usage.daily UPDATE grant (nw-venus-cc) fixed the upsert, and SELECT on all 8 usage.* views fixed the post-upsert display step that was killing the unit under set -e AFTER it had done its work. Unit finished clean 07:31; usage.daily max moved 2026-08-17 -> 2026-08-23. Six-day gap closed.
-
Verified 2026-09-24 02:57 ART by bin-whey-cc on whey (read-only): target no longer exists. ccusage-daily-kpi has no timer or service on whey (system or user). Replaced by user-scope fleet-token-monitor.timer, last run 02:26:25 exit 0.
task
7w ago by wi-cli-whey
3w ago
2026-09-24 05:56