nrm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NR_COUNT_TYPE   = "count"
	NR_DIST_TYPE    = "distribution"
	NR_GAUGE_TYPE   = "gauge"
	NR_SUMMARY_TYPE = "summary"
	NR_UNIQUE_TYPE  = "uniqueCount"

	DO_DEMO_PERIOD = "NRM_DO_DEMO_PERIOD"
	DO_DEMO_AMP    = "NRM_DO_DEMO_AMPLITIDE"

	InstNameVPCMetric     = "vpc-logs-metrics"
	InstNameNetflowMetric = "netflow-metrics"
	InstNameSynthetic     = "synthetic"
	InstNameKtranslate    = "heartbeat"

	MAX_ATTR_FOR_NR = 64
)

Variables

View Source
var (
	VALID_GEO = map[string]bool{
		"US": true,
		"VN": true,
		"AU": true,
	}
)

Functions

This section is empty.

Types

type Demozer

type Demozer struct {
	logger.ContextL
	// contains filtered or unexported fields
}

func NewDemozer

func NewDemozer(log logger.ContextL, period uint32, amplitude uint32) *Demozer

func (*Demozer) NewSineWaveOffset

func (d *Demozer) NewSineWaveOffset() *SineWave

Move wave a random value from 0 forward.

type NRCommon

type NRCommon struct {
	Timestamp  int64             `json:"timestamp"`
	Attributes map[string]string `json:"attributes"`
}

type NRMFormat

type NRMFormat struct {
	logger.ContextL

	EventChan chan []byte
	// contains filtered or unexported fields
}

func NewFormat

func NewFormat(log logger.Underlying, compression kt.Compression) (*NRMFormat, error)

func (*NRMFormat) From

func (f *NRMFormat) From(raw *kt.Output) ([]map[string]interface{}, error)

func (*NRMFormat) Rollup

func (f *NRMFormat) Rollup(rolls []rollup.Rollup) (*kt.Output, error)

func (*NRMFormat) To

func (f *NRMFormat) To(msgs []*kt.JCHF, serBuf []byte) (*kt.Output, error)

type NRMetric

type NRMetric struct {
	Name       string                 `json:"name"`
	Type       string                 `json:"type"`
	Value      interface{}            `json:"value,omitempty"`
	Timestamp  int64                  `json:"timestamp,omitempty"`
	Interval   int64                  `json:"interval.ms,omitempty"`
	Attributes map[string]interface{} `json:"attributes"`
}

type NRMetricSet

type NRMetricSet struct {
	Metrics []NRMetric `json:"metrics"`
	Common  *NRCommon  `json:"common"`
}

type SineWave

type SineWave struct {
	logger.ContextL
	Period    uint32
	Amplitude uint32
	PeriodVar int32

	// Generated data is written to this channel.
	Output chan float64
}

func NewSineWave

func NewSineWave(log logger.ContextL, period uint32, amplitude uint32) *SineWave

func (*SineWave) Generate

func (wave *SineWave) Generate()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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