docs: regenerate hivectl-cli.md for the migrate-stats verb

This commit is contained in:
damocles 2026-06-24 21:05:37 +02:00
commit d9d5495f1f

View file

@ -35,6 +35,7 @@ This document contains the help content for the `hivectl` command-line program.
* [`hivectl quota limit`↴](#hivectl-quota-limit)
* [`hivectl subvol`↴](#hivectl-subvol)
* [`hivectl subvol upgrade`↴](#hivectl-subvol-upgrade)
* [`hivectl migrate-stats`↴](#hivectl-migrate-stats)
* [`hivectl completions`↴](#hivectl-completions)
## `hivectl`
@ -57,6 +58,7 @@ Sibling to the `hive-c0re` daemon binary. Covers host-side admin operations that
* `restart` — Restart containers hive-wide — `stop` then `start` over the same scope. Bare `hivectl restart` restarts **everything** (all sub-agents plus the ci/forge/gateway/matrix infra containers); the same scope flags as `stop`/`start` narrow it (`--agents`, `--ci`, `--forge`, `--gateway`, `--matrix`, `--agent <name>`). If the stop phase reports a failure the start phase is skipped so the operator can investigate. Requires the hive-c0re daemon
* `quota` — Per-agent disk accounting + optional quotas via btrfs qgroups
* `subvol` — btrfs subvolume management for agent state dirs
* `migrate-stats` — One-shot backfill of historical per-agent turn stats into the OTEL collector as cumulative `claude_code.token.usage` metrics, so pre-OTEL token history shows up in grafana alongside the live stream. Reads each agent's `hyperhive-turn-stats.sqlite` and POSTs OTLP/HTTP JSON to the collector. Every datapoint is tagged `hyperhive-migration="true"`. Safe to re-run (cumulative samples at fixed historical timestamps are idempotent on the backend)
* `completions` — Generate a shell completion script for `hivectl` and print it to stdout
###### **Options:**
@ -513,6 +515,20 @@ Convert an existing plain-dir agent state root into a btrfs subvolume in place.
## `hivectl migrate-stats`
One-shot backfill of historical per-agent turn stats into the OTEL collector as cumulative `claude_code.token.usage` metrics, so pre-OTEL token history shows up in grafana alongside the live stream. Reads each agent's `hyperhive-turn-stats.sqlite` and POSTs OTLP/HTTP JSON to the collector. Every datapoint is tagged `hyperhive-migration="true"`. Safe to re-run (cumulative samples at fixed historical timestamps are idempotent on the backend)
**Usage:** `hivectl migrate-stats [OPTIONS]`
###### **Options:**
* `--endpoint <ENDPOINT>` — OTLP collector base URL (e.g. `http://10.42.0.1:4318`). Defaults to `$OTEL_EXPORTER_OTLP_ENDPOINT`, then `$HYPERHIVE_OTEL_ENDPOINT`
* `--agent <AGENT>` — Limit to a single agent (default: every agent with a state dir)
* `--dry-run` — Report datapoint counts without sending anything
## `hivectl completions`
Generate a shell completion script for `hivectl` and print it to stdout.