monitoring

package
v0.2.14-bgp-1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSvcNameEnv      = "STATUS_SVC_NAME"
	StatusSvcNamespaceEnv = "STATUS_SVC_NAMESPACE"
)

Variables

View Source
var ErrNoData = errors.New("collector returned no data")

ErrNoData indicates the collector found no data to collect, but had no other error.

Functions

func GetStatusServiceConfig added in v0.2.7

func GetStatusServiceConfig() (name, namespace string, err error)

GetStatusServiceConfig gets status service's name and namespace from the environment.

func IsNoDataError

func IsNoDataError(err error) bool

Types

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewBPFCollector

func NewBPFCollector() (Collector, error)

func NewFRRCollector

func NewFRRCollector() (Collector, error)

NewFRRCollector returns a new Collector exposing buddyinfo stats.

func NewNetlinkCollector

func NewNetlinkCollector() (Collector, error)

NewNetlinkCollector returns a new Collector exposing buddyinfo stats.

type DasSchiffNetworkOperatorCollector

type DasSchiffNetworkOperatorCollector struct {
	Collectors map[string]Collector
}

DasSchiffNetworkOperatorCollector implements the prometheus.Collector interface.

func NewDasSchiffNetworkOperatorCollector

func NewDasSchiffNetworkOperatorCollector(collectorConfig map[string]bool) (*DasSchiffNetworkOperatorCollector, error)

NewDasSchiffNetworkOperatorCollector creates a new DasSchiffNetworkOperatorCollector.

func (DasSchiffNetworkOperatorCollector) Collect

Collect implements the prometheus.Collector interface.

func (DasSchiffNetworkOperatorCollector) Describe

func (DasSchiffNetworkOperatorCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type Endpoint added in v0.2.7

type Endpoint struct {
	logr.Logger
	// contains filtered or unexported fields
}

func NewEndpoint added in v0.2.7

func NewEndpoint(k8sClient client.Client, frrcli FRRClient, svcName, svcNamespace string) *Endpoint

NewEndpoint creates new endpoint object.

func (*Endpoint) CreateMux added in v0.2.7

func (e *Endpoint) CreateMux() *http.ServeMux

CreateMux configures HTTP handlers.

func (*Endpoint) QueryAll added in v0.2.7

func (e *Endpoint) QueryAll(w http.ResponseWriter, r *http.Request)

QueryAll - when called, will pass the request to all nodes and return their responses.

func (*Endpoint) ShowBGP added in v0.2.7

func (e *Endpoint) ShowBGP(w http.ResponseWriter, r *http.Request)

ShowBGP returns a result of show bgp command. show bgp (vrf <vrf>) ipv4/ipv6 unicast <input> (longer-prefixes). show bgp vrf <all|vrf> summary.

func (*Endpoint) ShowBGPSummary added in v0.2.7

func (e *Endpoint) ShowBGPSummary(w http.ResponseWriter, r *http.Request)

ShowBGPSummary returns result of show bgp vrf <all|vrf> summary command.

func (*Endpoint) ShowEVPN added in v0.2.7

func (e *Endpoint) ShowEVPN(w http.ResponseWriter, r *http.Request)

ShowEVPN returns result of show evpn command. show evpn vni json. show evpn rmac vni <all|vrf>. show evpn mac vni <all|vrf>. show evpn next-hops vni <all|vrf> json.

func (*Endpoint) ShowRoute added in v0.2.7

func (e *Endpoint) ShowRoute(w http.ResponseWriter, r *http.Request)

ShowRoute returns result of show ip/ipv6 route command. show ip/ipv6 route (vrf <vrf>) <input> (longer-prefixes).

type FRRClient added in v0.2.7

type FRRClient interface {
	ExecuteWithJSON(args []string) []byte
}

Directories

Path Synopsis
Package mock_monitoring is a generated GoMock package.
Package mock_monitoring is a generated GoMock package.

Jump to

Keyboard shortcuts

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