Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostInfo ¶
type HostInfo struct { // Timestamp returns the timestamp in UTC on the collection time. Timestamp time.Time `json:"timestamp"` // CPU returns information about the CPU such as family, model, cores, etc. CPU []cpu.InfoStat `json:"cpu"` // CPUTimes returns statistics on CPU usage represented in Jiffies. CPUTimes []cpu.TimesStat `json:"cpu_times"` // Disk returns statitics on disk usage for all accessible partitions. Disk []*disk.UsageStat `json:"disk"` // Host returns general host information such as hostname, platform, uptime, // kernel version, etc. Host *host.InfoStat `json:"host"` // Memory contains statistics about the memory such as total, available, and // used memory in number of bytes. Memory *mem.VirtualMemoryStat `json:"memory"` }
HostInfo holds all the information that gets captured on the host. The set of information captured depends on the host operating system. For more information, refer to: https://github.com/shirou/gopsutil#current-status
func CollectHostInfo ¶
CollectHostInfo returns information on the host, which includes general host status, CPU, memory, and disk utilization.
The function does a best-effort capture on the most information possible, continuing on capture errors encountered and appending them to a resulting multierror.Error that gets returned at the end.
type HostInfoError ¶
HostInfoError is a typed error for more convenient error checking.
func (*HostInfoError) Error ¶
func (e *HostInfoError) Error() string
func (*HostInfoError) WrappedErrors ¶
func (e *HostInfoError) WrappedErrors() []error
Click to show internal directories.
Click to hide internal directories.