awscsm

package
v1.247349.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationRecord

type AggregationRecord struct {
	Expiry    time.Time
	Timestamp time.Time
	Keys      map[string]string

	SEHMetrics       awscsmmetrics.SEHMetrics
	FrequencyMetrics awscsmmetrics.FrequencyMetrics
	Samples          Samples
}

AggregationRecord represents a SDK Metrics metric that will contain various metrics received from a client.

func NewAggregationRecord

func NewAggregationRecord() AggregationRecord

NewAggregationRecord will return an empty AggregationRecord

func (AggregationRecord) GetFrequencyMetrics

func (m AggregationRecord) GetFrequencyMetrics() []awscsmmetrics.FrequencyMetric

GetFrequencyMetrics will return an array of FrequencyMetrics

func (AggregationRecord) GetKeys

func (m AggregationRecord) GetKeys() map[string]string

GetKeys will return the keys associated with the record

func (AggregationRecord) GetSEHMetrics

func (m AggregationRecord) GetSEHMetrics() []awscsmmetrics.SEHMetric

GetSEHMetrics will return an array of SEHMetric

func (AggregationRecord) GetSamples

func (m AggregationRecord) GetSamples() []map[string]interface{}

GetSamples will return the list of samples gathered during metric collection.

func (AggregationRecord) GetTimestamp

func (m AggregationRecord) GetTimestamp() time.Time

GetTimestamp will return the timestamp associated with the record

type AggregationRecordFilter

type AggregationRecordFilter func(AggregationRecord) bool

AggregationRecordFilter is used to filter metrics based off a given function.

type AggregationRecords

type AggregationRecords map[string]AggregationRecord

AggregationRecords is a map of aggregation records keyed off of each record's aggregation key

func (AggregationRecords) Add

func (records AggregationRecords) Add(raw map[string]interface{})

Add will add a metric to a given record by building an aggregation key from the given metric.

func (AggregationRecords) MapStringInterface

func (records AggregationRecords) MapStringInterface(filters ...AggregationRecordFilter) map[string]interface{}

MapStringInterface will return a map[string]interface{} from the strongly typed AggregationRecords.

type AwsCsmListener

type AwsCsmListener struct {
	ServiceAddresses []string
	Log              telegraf.Logger
	// contains filtered or unexported fields
}

func (*AwsCsmListener) Description

func (aws *AwsCsmListener) Description() string

func (*AwsCsmListener) Gather

func (aws *AwsCsmListener) Gather(_ telegraf.Accumulator) error

func (*AwsCsmListener) SampleConfig

func (aws *AwsCsmListener) SampleConfig() string

func (*AwsCsmListener) SetParser

func (aws *AwsCsmListener) SetParser(parser parsers.Parser)

func (*AwsCsmListener) Start

func (aws *AwsCsmListener) Start(_ telegraf.Accumulator) error

func (*AwsCsmListener) Stop

func (aws *AwsCsmListener) Stop()

type Samples

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

Samples represent the raw request received from the input.

func (*Samples) Add

func (s *Samples) Add(m map[string]interface{})

Add will add the sample to the sample list

func (*Samples) Count

func (s *Samples) Count(signature uint32) bool

Count will increase the events count for a given signature

func (Samples) Len

func (s Samples) Len() int64

Len will return the proper length of samples

func (Samples) ShouldAdd

func (s Samples) ShouldAdd(threshold float64) bool

ShouldAdd will return true or false depending on whether or not we should store the sample. How a sample is chosen to be added is done by a randomization algorithm.

Jump to

Keyboard shortcuts

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