Skip to main content
Version: v5.7.0

opschain admin runner-group demand

Included from Basic tier

opschain admin runner-group demand <name>

Reports the work a runner group is on the hook for (the v2 RunnerService.GetRunnerGroupDemand RPC) — the autoscaler signal:

  • queued — parked (unleased) queue entries the group's placement posture could take: its name, attributes and exclusivity are checked against each entry's requirement, so an exclusive group counts only work targeted at it, while a non-exclusive group also counts unconstrained work.
  • running — work the group's runners currently hold.

An autoscaler polls this and scales the group's runner count on it: non-zero queued with no spare runners means scale up; zero demand means the group can shrink. The counts are a point-in-time snapshot of the dispatch queue, not a rate.

Flags​

FlagMeaning
--server <url>Server base URL. Default: the active context / OPSCHAIN_SERVER.
--auth-token <token>Admin bearer token override. Default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login.

Output​

As JSON (-o yaml for YAML):

{
"group": "secure",
"queued": 3,
"running": 1
}

Exit codes​

0 reported; 1 the request failed (unknown group, network, rejected token); 2 usage.

Named errors​

  • a server is required — pass --server <url>, set OPSCHAIN_SERVER, or 'opschain context use <name>' (exit 2)
  • this command needs a login or an admin token — run 'opschain login', pass --auth-token, set OPSCHAIN_ADMIN_TOKEN, or store one with 'opschain admin login' (exit 2)
  • the server rejected the credential — run 'opschain login' again, or check the admin token (exit 1)
  • An unknown group name reports the server's 404 (exit 1).

See also​

  • opschain docs fleet-queue — the queue these counts are computed from, and how a requirement matches a group.
  • opschain docs cli/admin-runner-group-set — the posture (attributes, exclusivity) the matching uses.
  • opschain docs cli/admin-runner-token-create — mint enrolment tokens for the runners an autoscaler brings up.