metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2016 License: Apache-2.0 Imports: 6 Imported by: 22

Documentation

Index

Constants

View Source
const (
	TotalEnvelopesReceivedKey               = "TotalEnvelopesReceived"
	LastEnvelopReceivedTimestampKey         = "LastEnvelopReceivedTimestamp"
	TotalMetricsReceivedKey                 = "TotalMetricsReceived"
	LastMetricReceivedTimestampKey          = "LastMetricReceivedTimestamp"
	TotalContainerMetricsReceivedKey        = "TotalContainerMetricsReceived"
	TotalContainerMetricsProcessedKey       = "TotalContainerMetricsProcessed"
	LastContainerMetricReceivedTimestampKey = "LastContainerMetricReceivedTimestamp"
	TotalCounterEventsReceivedKey           = "TotalCounterEventsReceived"
	TotalCounterEventsProcessedKey          = "TotalCounterEventsProcessed"
	LastCounterEventReceivedTimestampKey    = "LastCounterEventReceivedTimestamp"
	TotalValueMetricsReceivedKey            = "TotalValueMetricsReceived"
	TotalValueMetricsProcessedKey           = "TotalValueMetricsProcessed"
	LastValueMetricReceivedTimestampKey     = "LastValueMetricReceivedTimestamp"
	SlowConsumerAlertKey                    = "SlowConsumerAlert"
	LastSlowConsumerAlertTimestampKey       = "LastSlowConsumerAlertTimestamp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerMetric

type ContainerMetric struct {
	Origin           string
	Timestamp        int64
	Deployment       string
	Job              string
	Index            string
	IP               string
	Tags             map[string]string
	ApplicationId    string
	InstanceIndex    int32
	CpuPercentage    float64
	MemoryBytes      uint64
	DiskBytes        uint64
	MemoryBytesQuota uint64
	DiskBytesQuota   uint64
}

type ContainerMetrics

type ContainerMetrics []ContainerMetric

type CounterEvent

type CounterEvent struct {
	Origin     string
	Timestamp  int64
	Deployment string
	Job        string
	Index      string
	IP         string
	Tags       map[string]string
	Name       string
	Delta      uint64
	Total      uint64
}

type CounterEvents

type CounterEvents []CounterEvent

type InternalMetrics

type InternalMetrics struct {
	TotalEnvelopesReceived               int64
	LastEnvelopReceivedTimestamp         int64
	TotalMetricsReceived                 int64
	LastMetricReceivedTimestamp          int64
	TotalContainerMetricsReceived        int64
	TotalContainerMetricsProcessed       int64
	LastContainerMetricReceivedTimestamp int64
	TotalCounterEventsReceived           int64
	TotalCounterEventsProcessed          int64
	LastCounterEventReceivedTimestamp    int64
	TotalValueMetricsReceived            int64
	TotalValueMetricsProcessed           int64
	LastValueMetricReceivedTimestamp     int64
	SlowConsumerAlert                    bool
	LastSlowConsumerAlertTimestamp       int64
}

type Store

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

func NewStore

func NewStore(
	metricsExpiration time.Duration,
	metricsCleanupInterval time.Duration,
	deploymentFilter *filters.DeploymentFilter,
	eventFilter *filters.EventFilter,
) *Store

func (*Store) AddMetric

func (s *Store) AddMetric(envelope *events.Envelope)

func (*Store) AlertSlowConsumerError

func (s *Store) AlertSlowConsumerError()

func (*Store) FlushContainerMetrics

func (s *Store) FlushContainerMetrics()

func (*Store) FlushCounterEvents

func (s *Store) FlushCounterEvents()

func (*Store) FlushValueMetrics

func (s *Store) FlushValueMetrics()

func (*Store) GetContainerMetrics

func (s *Store) GetContainerMetrics() ContainerMetrics

func (*Store) GetCounterEvents

func (s *Store) GetCounterEvents() CounterEvents

func (*Store) GetInternalMetrics

func (s *Store) GetInternalMetrics() InternalMetrics

func (*Store) GetValueMetrics

func (s *Store) GetValueMetrics() ValueMetrics

func (*Store) SetInternalMetrics

func (s *Store) SetInternalMetrics(internalMetrics InternalMetrics)

type ValueMetric

type ValueMetric struct {
	Origin     string
	Timestamp  int64
	Deployment string
	Job        string
	Index      string
	IP         string
	Tags       map[string]string
	Name       string
	Value      float64
	Unit       string
}

type ValueMetrics

type ValueMetrics []ValueMetric

Jump to

Keyboard shortcuts

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