Status
The status summary of a node. osapi behavior get --name status and
osapi behavior method get show the same. Its chain
shows each call that its examples make.
Behavior
| Name | status |
| Description | The status summary of a node |
| Placement | node |
| Internal | no |
| API | yes |
| CLI | yes |
| Next | no |
| Platforms | linux, darwin |
| Sudo | none |
| Runs | none |
| Writes | none |
| Keeps state | no |
| Uses | hostname, uptime, os, load, memory, disk |
| Used by | none |
Methods (1)
| NAME | VERB | HTTP | ROUTE | PERMISSION | DESCRIPTION |
|---|---|---|---|---|---|
| get | read | GET | /api/node/{hostname}/status | status:read | Get the status summary of the host |
Types (1)
| NAME | INPUT | OUTPUT |
|---|---|---|
| get | GetInput | Entry { name, uptime, os_info, load_average, memory, disks, errors } |
Settings (0)
None. Declare them with behavior.Config.
Telemetry
| Span | behavior.status.<method> |
| Child spans | behavior.hostname.<method>, behavior.uptime.<method>, behavior.os.<method>, behavior.load.<method>, behavior.memory.<method>, behavior.disk.<method>, exec hostnamectl, exec hostname, exec sysctl, exec sw_vers, exec vm_stat, exec df, exec lsblk, exec mount, exec zfs |
| Metrics | osapi_behavior_calls_total, osapi_behavior_duration_seconds, osapi_behavior_changes_total |
| Attributes | osapi.behavior.name, osapi.behavior.method, osapi.behavior.verb, osapi.behavior.outcome, osapi.behavior.changed |
| Recorded inputs | none |
Method get
| Name | get |
| Verb | read |
| Description | Get the status summary of the host |
| Detail | Runs the get of the hostname, uptime, os, load, memory and disk behaviors on the host, and answers with each. A read that fails is in errors, as its name and its error, and the other fields still answer. |
| HTTP | GET |
| Route | /api/node/{hostname}/status |
| Permission | status:read |
| Command | osapi client node status get |
| Input type | GetInput |
| Output type | Entry |
Input (0)
None. The method takes no input; its command needs only --target.
Output (7)
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
| name | string | The hostname of the host, as the hostname command prints it |
| uptime | object | How long the host has run |
| os_info | object | The operating system |
| load_average | object | The load averages of the host |
| memory | object | The memory of the host |
| disks | array | Each local filesystem |
| errors | array | Each read that failed, as name: error. The other fields still answer. |
Examples (2)
| EXAMPLE | INPUT | OUTPUT |
|---|---|---|
| An Ubuntu host | (none) | name=web-01, uptime=map[seconds:93900 uptime:1 day, 2 hours, 5 minutes], os_info=map[distribution:ubuntu version:24.04], load_average=map[15min:0.25 1min:0.32 5min:0.28], memory=map[free:2.147483648e+09 total:8.589934592e+09 used:4.294967296e+09], disks=[map[free:3.145728e+10 name:/ total:5.24288e+10 used:2.097152e+10]] |
| A Mac | (none) | name=web-01, uptime=map[seconds:93900 uptime:1 day, 2 hours, 5 minutes], os_info=map[distribution:darwin version:15.5], load_average=map[15min:0.25 1min:0.32 5min:0.28], memory=map[free:2.147483648e+09 total:8.589934592e+09 used:4.294967296e+09], disks=[map[free:3.145728e+10 name:/ total:5.24288e+10 used:2.097152e+10]] |