Documentation ¶
Overview ¶
Package data implements types to handle monitoring data, calculate values from it, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { // Data per each node. Nodes map[string]*Node Timestamp time.Time Interval time.Duration }
Data represents the monitoring data retrieved via Talos API.
Data structure is sent over the channel each interval.
func (*Data) CalculateDiff ¶
CalculateDiff with data from previous iteration.
type Node ¶
type Node struct { // These fields are directly API responses. Hostname *machine.Hostname LoadAvg *machine.LoadAvg Version *machine.Version Memory *machine.Memory SystemStat *machine.SystemStat CPUsInfo *machine.CPUsInfo NetDevStats *machine.NetworkDeviceStats DiskStats *machine.DiskStats Processes *machine.Process // These fields are calculated as diff with Node data from previous pol. SystemStatDiff *machine.SystemStat NetDevStatsDiff *machine.NetworkDeviceStats DiskStatsDiff *machine.DiskStats ProcsDiff map[int32]*machine.ProcessInfo // Time-series data. Series map[string][]float64 }
Node represents data gathered from a single node.
func (*Node) CPUUsageByName ¶
CPUUsageByName returns CPU usage by name.
func (*Node) CtxSwitches ¶
CtxSwitches returns diff of context switches.
func (*Node) ProcsCreated ¶
ProcsCreated returns diff of processes created.
func (*Node) UpdateDiff ¶
UpdateDiff calculates diff with node data from previous iteration.
func (*Node) UpdateSeries ¶
UpdateSeries builds time-series data based on previous iteration data.
Click to show internal directories.
Click to hide internal directories.