stats

package
v0.0.0-...-1fbe32e Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const KindBGP = "bgp"
View Source
const KindDirector = "director"
View Source
const KindRealServer = "realserver"
View Source
const Prefix = "rdei_lb_"

Variables

View Source
var (
	LatencyBuckets []float64 = []float64{100, 1000, 10000, 50000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1500000, 2000000, 3000000}
)

consts for prometheus initialization

Functions

func NewCounters

func NewCounters(ns, svc, p string, isTCP bool) *counters

NewCounters returns an initialized counters object. A HyperLogLog++ will be intantiated as a part of this in order to keep track of the unique number of flows observed in the window period. Where this is a challenge is with respect to measuring bidirectional flows. In the case of TCP, you can simply divide the HLL cardinality count by two, because all flows are by definition bidirectional. For UDP, there doesn't seem to be a good way to track the total number of bidirectional flows. But outbound flows from the VIP address are actually not possible, so it only makes sense to track inbound flows.

Types

type LBKind

type LBKind string

type Stats

type Stats struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStats

func NewStats(ctx context.Context, kind LBKind, device, statsHost, prometheusPort string, freq time.Duration, logger logrus.FieldLogger) (*Stats, error)

func (*Stats) EnableBPFStats

func (s *Stats) EnableBPFStats() error

func (*Stats) UpdateConfig

func (s *Stats) UpdateConfig(c *types.ClusterConfig) error

type WorkerStateMetrics

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

func NewWorkerStateMetrics

func NewWorkerStateMetrics(kind, secZone string) *WorkerStateMetrics

func (*WorkerStateMetrics) ArpingFailure

func (w *WorkerStateMetrics) ArpingFailure(err error)

ArpingFailure switch on what type of metric we should increment

func (*WorkerStateMetrics) ConfigUpdate

func (w *WorkerStateMetrics) ConfigUpdate()

func (*WorkerStateMetrics) IptablesWriteFailure

func (w *WorkerStateMetrics) IptablesWriteFailure(status int)

func (*WorkerStateMetrics) LoopbackAdditionErr

func (w *WorkerStateMetrics) LoopbackAdditionErr(errs int, addrKind string)

func (*WorkerStateMetrics) LoopbackAdditions

func (w *WorkerStateMetrics) LoopbackAdditions(additions int, addrKind string)

func (*WorkerStateMetrics) LoopbackConfigHealthy

func (w *WorkerStateMetrics) LoopbackConfigHealthy(up int, addrKind string)

func (*WorkerStateMetrics) LoopbackRemovalErr

func (w *WorkerStateMetrics) LoopbackRemovalErr(errs int, addrKind string)

func (*WorkerStateMetrics) LoopbackRemovals

func (w *WorkerStateMetrics) LoopbackRemovals(removals int, addrKind string)

func (*WorkerStateMetrics) LoopbackTotalDesired

func (w *WorkerStateMetrics) LoopbackTotalDesired(totals int, addrKind string)

func (*WorkerStateMetrics) NodeUpdate

func (w *WorkerStateMetrics) NodeUpdate(outcome string)

func (*WorkerStateMetrics) QueueDepth

func (w *WorkerStateMetrics) QueueDepth(depth int)

QueueDepth is the depth of the configuration channel gauge config_chan_depth

func (*WorkerStateMetrics) Reconfigure

func (w *WorkerStateMetrics) Reconfigure(outcome string, d time.Duration)

Reconfigure is the end-to-end reconfiguration event. counter reconfigure_count bucket reconfigure_latency

Jump to

Keyboard shortcuts

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