Actions
15 actions, callable from the panel, the command palette and the API as
POST /api/v1/a/<id>. Internal actions used between modules are not listed.
| Action | What it does | Risk | Preview |
|---|---|---|---|
stats.overview.get | Admin overview (read) | low | No dry run |
stats.node.get | Node metrics (read) | low | No dry run |
stats.usage.get | Account usage (read) | low | No dry run |
stats.top.get | Top consumers (read) | low | No dry run |
stats.query | Metric query (scoped) (read) | low | No dry run |
stats.alert.rule.list | List alert rules (read) | low | No dry run |
stats.alert.rule.create | Create an alert rule | medium | |
stats.alert.rule.update | Update an alert rule | medium | |
stats.alert.rule.delete | Delete an alert rule | medium | |
stats.alert.list | List alerts (read) | low | No dry run |
stats.alert.ack | Acknowledge an alert | low | |
stats.alert.resolve | Resolve an alert by hand | low | |
stats.retention.get | Read retention and store disk use (read) | low | No dry run |
stats.retention.set | Set metrics retention | high | |
stats.reconcile | Re-apply the metrics store and collectors | low |
Permissions and limits
Permissions
stats.overview.viewSee the fleet overviewstats.node.viewSee node metricsstats.usage.viewSee account usagestats.queryRun scoped metric queriesstats.alert.viewSee alerts and rulesstats.alert.manageCreate and change alert rulesstats.alert.respondAcknowledge and resolve alertsstats.adminMetrics retention and collectors
Engineering notes
Generated from modules/stats/docs.md at build 38156245. These are the notes the engineers keep
next to the code: precise, technical, and honest about what is not done yet.
Metrics for the fleet, nodes and every account, stored in VictoriaMetrics on the control node.
How it works
- Collect: the plugin asks every node's agent for a snapshot (
stats.collect) every 15 s and writes it to VictoriaMetrics (/api/v1/import/prometheus, loopback). The agent only samples (internal/agent/metrics.go:/proc, statfs,systemctl list-units, cgroup v2 of everyrc-acct-<user>.slice); there is no node_exporter. This is control-plane-pulled rather than agent-pushed because agents have no route to the store and the op bus already is the authenticated channel. The plugin addsnode, and forrc_account_*replacesuserwithaccount_id+username. - Store:
stats.vm.installinstalls the pinned VictoriaMetrics release (version and SHA-256 compiled into the agent, URL built from them, cached under/var/lib/respirecloud/cacheso offline labs can preload the tarball) asrc-victoria-metrics.service(DynamicUser, loopback:8428,-retentionPeriod). The collector self-heals: if the store does not answer it re-runs the install (at most once a minute) and emitsstats.store.downonce. - Series:
rc_node_*(cpu seconds by mode, load, memory, swap, disk/inodes per mount, net per device, PSI, uptime),rc_node_up(written by the plugin, 0 when the agent does not answer),rc_service_up{unit},rc_account_*(cpu usage seconds, memory, pids, io bytes, OOM kills, CPU throttle count, cpu/memory limits). - Scoping (AC-stats-28):
stats.query,stats.usage.get,stats.top.getpass VictoriaMetrics'extra_filters[]with{account_id="<id>"}(user),{account_id=~"id1|id2"}(reseller: accounts.list as the caller), nothing (admin). VictoriaMetrics forces the filter onto every selector, so no expression can read another account's series. The filter is derived from the authenticated actor; account ids are validated as UUIDs. Node/fleet metrics have noaccount_idlabel, so tenants cannot see them. - Alerts: threshold rules (
exprreturning a vector +op+threshold+for_seconds+ severity), evaluated every minute (stats.alert.evaluate, internal schedule). pending -> firing afterfor_seconds-> resolved when the series stops matching. A store outage skips the round (never resolves). Eventsstats.alert.fired|resolved|acked. Six default rules (node down, service down, disk > 85%, inodes > 90%, memory pressure, load) are seeded on first evaluation. 1.0.53 (owner 2026-11-24, "the load notices never go away when things are calm"): "load high" is the 5-minute load per CPU (rc_node_load5 / on(node) sum by (node) (rate(rc_node_cpu_seconds_total[5m]))) above 1.5 for 15 minutes; it was a fixed load of 8, which a 16-CPU server passes on an ordinary day (s1's median is 0.69 per CPU, so it fired about ten times a day and stayed for hours). "service down" leaves out jobs' short-lived units (rc-job-*). A built-in rule still exactly as first shipped is moved to the new default; one a person changed is left alone. - Retention:
stats.retention.setstores the days and re-runs the install (rewrites the unit, restarts the store). Default 90 days; VictoriaMetrics OSS has no rollups, so the spec's tiered 15 d / 90 d / 13 months is not implemented.
Actions
stats.overview.get, stats.node.get, stats.usage.get, stats.top.get, stats.query, stats.alert.rule.{list,create,update,delete},
stats.alert.{list,ack,resolve}, stats.retention.{get,set}, stats.reconcile, internal stats.alert.evaluate.
Verified (lab w4-05)
See docs/tasks/w4/w4-05-stats-logs.handover.md.
Not built (spec items left)
Channels (email/webhook/Slack/push), routing/escalation, silences, uptime probes, topology, capacity forecast, site analytics from access logs, reports, saved dashboard layouts, per-key limit meters beyond cgroups, threshold notifications at 80/95/100%.