Documentation ¶
Index ¶
Constants ¶
View Source
const NHostSims = 11
Variables ¶
View Source
var ( StatusByteString = []byte("status") // heap optimization // Field keys for 'air condition indoor' points. ServiceUpFieldKey = []byte("service_up") )
View Source
var ( NCPUsFieldKey = []byte("n_cpus") // Field keys for 'load' points. LoadFieldKeys = [][]byte{ []byte("load1"), []byte("load5"), []byte("load15"), } CPUsCount = []int{2, 4, 8, 16, 32, 64} )
View Source
var ClusterIdTagkey = []byte("cluster_id")
View Source
var ClusterSize = 10
View Source
var ClusterSizes = []int{5, 6, 7, 8, 9, 10, 11, 12, 13}
View Source
var (
SystemByteString = []byte("system") // heap optimization
)
Functions ¶
func NewHostMeasurements ¶
Types ¶
type DashboardSimulator ¶
type DashboardSimulator struct {
// contains filtered or unexported fields
}
A DashboardSimulator generates data similar to telemetry from Telegraf. It fulfills the Simulator interface.
func (*DashboardSimulator) Finished ¶
func (g *DashboardSimulator) Finished() bool
func (*DashboardSimulator) Next ¶
func (d *DashboardSimulator) Next(p *Point)
Next advances a Point to the next state in the generator.
func (*DashboardSimulator) SeenPoints ¶
func (g *DashboardSimulator) SeenPoints() int64
func (*DashboardSimulator) SeenValues ¶
func (g *DashboardSimulator) SeenValues() int64
func (*DashboardSimulator) Total ¶
func (g *DashboardSimulator) Total() int64
type DashboardSimulatorConfig ¶
type DashboardSimulatorConfig struct { Start time.Time End time.Time HostCount int64 HostOffset int64 }
Type DashboardSimulatorConfig is used to create a DashboardSimulator.
func (*DashboardSimulatorConfig) ToSimulator ¶
func (d *DashboardSimulatorConfig) ToSimulator() *DashboardSimulator
type Host ¶
type Host struct { SimulatedMeasurements []SimulatedMeasurement // These are all assigned once, at Host creation: Name, Region, Datacenter, Rack, OS, Arch []byte ClusterId, Service, ServiceVersion, ServiceEnvironment []byte }
Type Host models a machine being monitored by Telegraf.
type StatusMeasurement ¶
type StatusMeasurement struct {
// contains filtered or unexported fields
}
func NewStatusMeasurement ¶
func NewStatusMeasurement(start time.Time) *StatusMeasurement
func (*StatusMeasurement) Tick ¶
func (m *StatusMeasurement) Tick(d time.Duration)
func (*StatusMeasurement) ToPoint ¶
func (m *StatusMeasurement) ToPoint(p *Point) bool
type SystemMeasurement ¶
type SystemMeasurement struct {
// contains filtered or unexported fields
}
func NewSystemMeasurement ¶
func NewSystemMeasurement(start time.Time) *SystemMeasurement
func (*SystemMeasurement) Tick ¶
func (m *SystemMeasurement) Tick(d time.Duration)
func (*SystemMeasurement) ToPoint ¶
func (m *SystemMeasurement) ToPoint(p *Point) bool
Click to show internal directories.
Click to hide internal directories.