Documentation
¶
Overview ¶
Package status is the status behavior: the status summary of a node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Behavior = behavior.Register(behavior.Define( "status", "The status summary of a node", behavior.Node, behavior.API, behavior.Area(area.Node), behavior.CLI, behavior.Platform(behavior.PlatformLinux, newReader), behavior.Platform(behavior.PlatformDarwin, newReader), behavior.Requires(hostname.Behavior, uptime.Behavior, osb.Behavior, load.Behavior, memory.Behavior, disk.Behavior), behavior.Read("get", Get). Describe("Get the status summary of the host"). Explain("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."). Example("An Ubuntu host", GetInput{}, summary(osb.Release{Distribution: "ubuntu", Version: "24.04"}), linux...). Example("A Mac", GetInput{}, summary(osb.Release{Distribution: "darwin", Version: "15.5"}), darwin...), ))
Behavior is the status summary of a node: the hostname, uptime, os, load, memory and disk reads in one call.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Name string `json:"name" doc:"The hostname of the host, as the hostname command prints it"`
Uptime uptime.Entry `json:"uptime" doc:"How long the host has run"`
OSInfo osb.Release `json:"os_info" doc:"The operating system"`
LoadAverage load.Averages `json:"load_average" doc:"The load averages of the host"`
Memory memory.Usage `json:"memory" doc:"The memory of the host"`
Disks []disk.Disk `json:"disks" doc:"Each local filesystem"`
Errors []string `json:"errors,omitempty" doc:"Each read that failed, as name: error. The other fields still answer."`
}
Entry is the status summary of one host: what the hostname, uptime, os, load, memory and disk behaviors read.