stats

package
v1.14.0-rc.6 Latest Latest
Warning

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

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

Documentation

Overview

Package stats provides chain elements for retrieving statistics from vpp interfaces

Index

Constants

This section is empty.

Variables

View Source
var (

	// ClientRxBytes - Total received bytes by client
	ClientRxBytes = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "client_rx_bytes_total",
			Help: "Total received bytes by client",
		},
	)
	// ClientTxBytes - Total transmitted bytes by client
	ClientTxBytes = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "client_tx_bytes_total",
			Help: "Total transmitted bytes by client",
		},
	)
	// ClientRxPackets - Total received packets by client
	ClientRxPackets = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "client_rx_packets_total",
			Help: "Total received packets by client",
		},
	)
	// ClientTxPackets - Total transmitted packets by client
	ClientTxPackets = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "client_tx_packets_total",
			Help: "Total transmitted packets by client",
		},
	)
	// ClientDrops - Total drops by client
	ClientDrops = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "client_drops_total",
			Help: "Total drops by client",
		},
	)
	// ServerRxBytes - Total received bytes by server
	ServerRxBytes = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "server_rx_bytes_total",
			Help: "Total received bytes by server",
		},
	)
	// ServerTxBytes - Total transmitted bytes by server
	ServerTxBytes = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "server_tx_bytes_total",
			Help: "Total transmitted bytes by server",
		},
	)
	// ServerRxPackets - Total received packets by server
	ServerRxPackets = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "server_rx_packets_total",
			Help: "Total received packets by server",
		},
	)
	// ServerTxPackets - Total transmitted packets by server
	ServerTxPackets = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "server_tx_packets_total",
			Help: "Total transmitted packets by server",
		},
	)
	// ServerDrops - Total drops by server
	ServerDrops = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "server_drops_total",
			Help: "Total drops by server",
		},
	)
)

Functions

func NewClient

func NewClient(ctx context.Context, options ...Option) networkservice.NetworkServiceClient

NewClient provides a NetworkServiceClient chain elements that retrieves vpp interface metrics.

func NewServer

func NewServer(ctx context.Context, options ...Option) networkservice.NetworkServiceServer

NewServer provides a NetworkServiceServer chain elements that retrieves vpp interface statistics.

Types

type Option

type Option func(o *statsOptions)

Option is an option pattern for stats server/client

func WithSocket

func WithSocket(socket string) Option

WithSocket sets stats socket name

Jump to

Keyboard shortcuts

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