hangar metrics
Show what Hangars are using right now.
What each Hangar is using right now: processor and memory against what its size allows, and how full its home disk is.
A Hangar that reaches its memory limit freezes rather than restarting, so 90% is the point to act. A paused or starting Hangar reports null rather than 0, and its disk keeps the fill it last had. This is a snapshot; the console's Overview draws the last hour.
Usage
outplane hangar metrics [HANGAR]Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Omit for every Hangar in the team. |
Output
| Field | Type | Description |
|---|---|---|
hangar | string | |
status | string | As hangar list reports it. Says why CPU and memory are null. |
cpuMillicores | int | null | 1000 millicores is one core. null while nothing runs: paused, starting or stopped. |
cpuPercent | int | null | Against cpuLimitMillicores. null while nothing runs or when no limit is on record, and above 100 when the Hangar is over it. |
memoryBytes | int | null | Working set. null while nothing runs. |
memoryPercent | int | null | Against memoryLimitMb. null while nothing runs or when no limit is on record. At 90 or more, act: a Hangar that reaches its limit freezes rather than restarting. |
diskUsedBytes | int | null | The home disk's last measured fill, kept while the Hangar is paused. null until it has been measured. |
diskPercent | int | null | Against diskCapacityBytes. |
diskCapacityBytes | int | null | The home disk's size as its file system reports it, a little under diskGb. |
cpuLimitMillicores | int | What its size allows. 0 when not on record. |
memoryLimitMb | int | What its size allows. 0 when not on record. |
Examples
What every Hangar is using
outplane hangar metricsOne Hangar
outplane hangar metrics myhangarCheck how close it is to its limits
outplane hangar metrics myhangar --json --fields hangar,status,memoryPercent,diskPercent{
"items": [
{
"diskPercent": 41,
"hangar": "myhangar",
"memoryPercent": 92,
"status": "ready"
}
],
"total": 1,
"truncated": false
}What to Know
- Cost is fixed: one API call for the Hangars, then nine instant queries on the metrics gateway for the whole team, the seven
metricsruns and two for the disks. Naming one Hangar filters the rows, not the queries, so ask once rather than in a loop. - A paused or starting Hangar has no samples. cpuMillicores, cpuPercent, memoryBytes and memoryPercent are null for it, not 0, and status says why.
- memoryPercent at 90 or more is the threshold to act on. A Hangar that reaches its memory limit freezes rather than restarting, and its status can go on reading ready. The text output warns under the table; the machine formats carry the number only.
- The disk figures are the home disk's last measured fill, carried for up to seven days, so a paused Hangar still reports them. They are null for a Hangar whose disk has never been measured, such as one still starting for the first time.
- Only the home disk is reported. Temporary storage outside it is not measured.
- Percentages are never capped: over 100 is a real state and the most useful thing this reports.
- The text table writes bytes in units a person reads. The machine formats carry the raw numbers, so nothing has to be parsed back.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of logs.no_team_slug, hangar.not_found, hangar.ambiguous, usage.empty_argument, metrics.bad_response, metrics.query_refused, context.no_team. Branch on that, or on the exit status. The message is prose and changes.