devops

package
v0.0.0-...-a552c4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Tick

func (m CPUMeasurement) Tick(d time.Duration)

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

func (*CPUOnlySimulator) Next

func (d *CPUOnlySimulator) Next(p *serialize.Point) bool

Next advances a Point to the next state in the generator.

func (CPUOnlySimulator) TagKeys

func (s CPUOnlySimulator) TagKeys() [][]byte

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) Fields

func (s DevopsSimulator) Fields() map[string][][]byte

func (DevopsSimulator) Finished

func (s DevopsSimulator) Finished() bool

Finished tells whether we have simulated all the necessary points

func (*DevopsSimulator) Next

func (d *DevopsSimulator) Next(p *serialize.Point) bool

Next advances a Point to the next state in the generator.

func (DevopsSimulator) TagKeys

func (s DevopsSimulator) TagKeys() [][]byte

type DevopsSimulatorConfig

type DevopsSimulatorConfig commonDevopsSimulatorConfig

DevopsSimulatorConfig is used to create a DevopsSimulator.

func (*DevopsSimulatorConfig) NewSimulator

func (d *DevopsSimulatorConfig) NewSimulator(interval time.Duration, limit uint64) common.Simulator

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) Tick

func (m DiskIOMeasurement) Tick(d time.Duration)

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) Tick

func (m DiskMeasurement) Tick(d time.Duration)

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 NewHost

func NewHost(i int, start time.Time) Host

NewHost creates a new host in a simulated devops use case

func NewHostCPUOnly

func NewHostCPUOnly(i int, start time.Time) Host

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

func NewHostCPUSingle(i int, start time.Time) Host

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

func (*Host) TickAll

func (h *Host) TickAll(d time.Duration)

TickAll advances all Distributions of a Host.

type KernelMeasurement

type KernelMeasurement struct {
	// contains filtered or unexported fields
}

func NewKernelMeasurement

func NewKernelMeasurement(start time.Time) *KernelMeasurement

func (KernelMeasurement) Tick

func (m KernelMeasurement) Tick(d time.Duration)

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) Tick

func (m MemMeasurement) Tick(d time.Duration)

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) Tick

func (m NetMeasurement) Tick(d time.Duration)

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) Tick

func (m NginxMeasurement) Tick(d time.Duration)

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) Tick

func (m PostgresqlMeasurement) Tick(d time.Duration)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL