Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearOldMetrics ¶
func ClearOldMetrics()
ClearOldMetrics will delete any metric that is older than 6 hours
func StartHostPoller ¶
func StartHostPoller()
StartHostPoller will refresh the cache for host details
Types ¶
type Info ¶
type Info struct { Host *host.InfoStat `json:"host"` Processors []cpu.InfoStat `json:"processors"` Memory *mem.VirtualMemoryStat `json:"memory"` Load *load.AvgStat `json:"load"` }
Info contains all host resource information
var HostInfo Info
HostInfo is a collection of information about the host and it's resources
type Metric ¶
type Metric struct { Created time.Time `json:"created"` Load float64 `json:"load"` MemoryUsed uint64 `json:"memoryUsed"` MemoryPercent float64 `json:"memoryPercent"` }
Metric represents a single instance in time of system info
func GetHostMetrics ¶
GetHostMetrics return slice of metrics based on given start and end time
func GetHostMetricsByTime ¶
func GetHostMetricsByTime(startTime interface{}, endTime interface{}) (m []Metric)
GetHostMetricsByTime return slice of metrics based on given start and end time
Click to show internal directories.
Click to hide internal directories.