Skip to main content

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​

Namestatus
DescriptionThe status summary of a node
Placementnode
Internalno
APIyes
CLIyes
Nextno
Platformslinux, darwin
Sudonone
Runsnone
Writesnone
Keeps stateno
Useshostname, uptime, os, load, memory, disk
Used bynone

Methods (1)​

NAMEVERBHTTPROUTEPERMISSIONDESCRIPTION
getreadGET/api/node/{hostname}/statusstatus:readGet the status summary of the host

Types (1)​

NAMEINPUTOUTPUT
getGetInputEntry { name, uptime, os_info, load_average, memory, disks, errors }

Settings (0)​

None. Declare them with behavior.Config.

Telemetry​

Spanbehavior.status.<method>
Child spansbehavior.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
Metricsosapi_behavior_calls_total, osapi_behavior_duration_seconds, osapi_behavior_changes_total
Attributesosapi.behavior.name, osapi.behavior.method, osapi.behavior.verb, osapi.behavior.outcome, osapi.behavior.changed
Recorded inputsnone

Method get​

Nameget
Verbread
DescriptionGet the status summary of the host
DetailRuns 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.
HTTPGET
Route/api/node/{hostname}/status
Permissionstatus:read
Commandosapi client node status get
Input typeGetInput
Output typeEntry

Input (0)​

None. The method takes no input; its command needs only --target.

Output (7)​

FIELDTYPEDESCRIPTION
namestringThe hostname of the host, as the hostname command prints it
uptimeobjectHow long the host has run
os_infoobjectThe operating system
load_averageobjectThe load averages of the host
memoryobjectThe memory of the host
disksarrayEach local filesystem
errorsarrayEach read that failed, as name: error. The other fields still answer.

Examples (2)​

EXAMPLEINPUTOUTPUT
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]]