counters

package
v0.0.0-...-b3ece4c Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Msgcount     = NewCounter("kafka_messages_total")
	KafkaOffsets = NewCounter("kafka_offset_current")
)

Meta Monitoring Data, to be added to default /metrics

View Source
var (
	// general counters
	FlowNumber  = NewCounter("flow_number_total")
	FlowBytes   = NewCounter("flow_bytes")
	FlowPackets = NewCounter("flow_packets")

	// TOP HOSTS
	HostBytes       = NewCounter("host_bytes")
	HostConnections = NewCounter("host_connections_total")
)

Flow Data, to be exported to Prometheus' /flowdata or to InfluxDB

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Fields        map[uint32]CounterItems
	CustomerIndex map[string][]uint32
	Name          string
	Access        *sync.Mutex
}

func NewCounter

func NewCounter(name string) Counter

func (*Counter) Add

func (counter *Counter) Add(label Label, value uint64)

func (*Counter) Delete

func (counter *Counter) Delete(label Label)

type CounterItems

type CounterItems struct {
	Label Label
	Value uint64
}

type Label

type Label struct {
	Fields map[string]string
}

func NewEmptyLabel

func NewEmptyLabel() Label

func NewLabel

func NewLabel(fields map[string]string) Label

func (*Label) Hash

func (label *Label) Hash() uint32

Jump to

Keyboard shortcuts

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