Documentation ¶
Index ¶
- Variables
- type CPUMeasurement
- type CPUOnlySimulator
- type CPUOnlySimulatorConfig
- type DevopsSimulator
- type DevopsSimulatorConfig
- type DiskIOMeasurement
- type DiskMeasurement
- type Host
- type KernelMeasurement
- type MemMeasurement
- type NetMeasurement
- type NginxMeasurement
- type PostgresqlMeasurement
- type RedisMeasurement
Constants ¶
This section is empty.
Variables ¶
var ( MachineTeamChoices = [][]byte{ []byte("SF"), []byte("NYC"), []byte("LON"), []byte("CHI"), } MachineOSChoices = [][]byte{ []byte("Ubuntu16.10"), []byte("Ubuntu16.04LTS"), []byte("Ubuntu15.10"), } MachineArchChoices = [][]byte{ []byte("x64"), []byte("x86"), } MachineServiceEnvironmentChoices = [][]byte{ []byte("production"), []byte("staging"), []byte("test"), } // MachineTagKeys fields common to all hosts: MachineTagKeys = [][]byte{ []byte("hostname"), []byte("region"), []byte("datacenter"), []byte("rack"), []byte("os"), []byte("arch"), []byte("team"), []byte("service"), []byte("service_version"), []byte("service_environment"), } )
Functions ¶
This section is empty.
Types ¶
type CPUMeasurement ¶
type CPUMeasurement struct {
// contains filtered or unexported fields
}
func NewCPUMeasurement ¶
func NewCPUMeasurement(start time.Time) *CPUMeasurement
func (*CPUMeasurement) ToPoint ¶
func (m *CPUMeasurement) ToPoint(p *serialize.Point)
type CPUOnlySimulator ¶
type CPUOnlySimulator struct {
// contains filtered or unexported fields
}
A CPUOnlySimulator generates data similar to telemetry from Telegraf for only CPU metrics. It fulfills the Simulator interface.
func (*CPUOnlySimulator) Fields ¶
func (d *CPUOnlySimulator) Fields() map[string][][]byte
Fields returns a map of subsystems to metrics collected
func (CPUOnlySimulator) Finished ¶
func (s CPUOnlySimulator) Finished() bool
Finished tells whether we have simulated all the necessary points
type CPUOnlySimulatorConfig ¶
type CPUOnlySimulatorConfig commonDevopsSimulatorConfig
CPUOnlySimulatorConfig is used to create a CPUOnlySimulator.
func (*CPUOnlySimulatorConfig) NewSimulator ¶
func (c *CPUOnlySimulatorConfig) NewSimulator(interval time.Duration, limit uint64) common.Simulator
NewSimulator produces a Simulator that conforms to the given SimulatorConfig over the specified interval
type DevopsSimulator ¶
type DevopsSimulator struct {
// contains filtered or unexported fields
}
DevopsSimulator generates data similar to telemetry, with metrics from a variety of device systems. It fulfills the Simulator interface.
func (DevopsSimulator) Finished ¶
func (s DevopsSimulator) Finished() bool
Finished tells whether we have simulated all the necessary points
type DevopsSimulatorConfig ¶
type DevopsSimulatorConfig commonDevopsSimulatorConfig
DevopsSimulatorConfig is used to create a DevopsSimulator.
func (*DevopsSimulatorConfig) NewSimulator ¶
NewSimulator produces a Simulator that conforms to the given SimulatorConfig over the specified interval
type DiskIOMeasurement ¶
type DiskIOMeasurement struct {
// contains filtered or unexported fields
}
func NewDiskIOMeasurement ¶
func NewDiskIOMeasurement(start time.Time) *DiskIOMeasurement
func (*DiskIOMeasurement) ToPoint ¶
func (m *DiskIOMeasurement) ToPoint(p *serialize.Point)
type DiskMeasurement ¶
type DiskMeasurement struct {
// contains filtered or unexported fields
}
func NewDiskMeasurement ¶
func NewDiskMeasurement(start time.Time) *DiskMeasurement
func (*DiskMeasurement) ToPoint ¶
func (m *DiskMeasurement) ToPoint(p *serialize.Point)
type Host ¶
type Host struct { SimulatedMeasurements []common.SimulatedMeasurement // These are all assigned once, at Host creation: Name, Region, Datacenter, Rack, OS, Arch []byte Team, Service, ServiceVersion, ServiceEnvironment []byte }
Host models a machine being monitored for dev ops
func NewHostCPUOnly ¶
NewHostCPUOnly creates a new host in a simulated cpu-only use case, which is a subset of a devops case with only CPU metrics simulated
func NewHostCPUSingle ¶
NewHostCPUSingle creates a new host in a simulated cpu-single use case, which is a subset of a devops case with only a single CPU metric is simulated
type KernelMeasurement ¶
type KernelMeasurement struct {
// contains filtered or unexported fields
}
func NewKernelMeasurement ¶
func NewKernelMeasurement(start time.Time) *KernelMeasurement
func (*KernelMeasurement) ToPoint ¶
func (m *KernelMeasurement) ToPoint(p *serialize.Point)
type MemMeasurement ¶
type MemMeasurement struct {
// contains filtered or unexported fields
}
func NewMemMeasurement ¶
func NewMemMeasurement(start time.Time) *MemMeasurement
func (*MemMeasurement) ToPoint ¶
func (m *MemMeasurement) ToPoint(p *serialize.Point)
type NetMeasurement ¶
type NetMeasurement struct {
// contains filtered or unexported fields
}
func NewNetMeasurement ¶
func NewNetMeasurement(start time.Time) *NetMeasurement
func (*NetMeasurement) ToPoint ¶
func (m *NetMeasurement) ToPoint(p *serialize.Point)
type NginxMeasurement ¶
type NginxMeasurement struct {
// contains filtered or unexported fields
}
func NewNginxMeasurement ¶
func NewNginxMeasurement(start time.Time) *NginxMeasurement
func (*NginxMeasurement) ToPoint ¶
func (m *NginxMeasurement) ToPoint(p *serialize.Point)
type PostgresqlMeasurement ¶
type PostgresqlMeasurement struct {
// contains filtered or unexported fields
}
func NewPostgresqlMeasurement ¶
func NewPostgresqlMeasurement(start time.Time) *PostgresqlMeasurement
func (*PostgresqlMeasurement) ToPoint ¶
func (m *PostgresqlMeasurement) ToPoint(p *serialize.Point)
type RedisMeasurement ¶
type RedisMeasurement struct {
// contains filtered or unexported fields
}
func NewRedisMeasurement ¶
func NewRedisMeasurement(start time.Time) *RedisMeasurement
func (*RedisMeasurement) Tick ¶
func (m *RedisMeasurement) Tick(d time.Duration)
func (*RedisMeasurement) ToPoint ¶
func (m *RedisMeasurement) ToPoint(p *serialize.Point)