pinger

package
v1.12.20 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPingerMetrics

func InitPingerMetrics()

func SetApiserverHealthyMetrics

func SetApiserverHealthyMetrics(nodeName string, latency float64)

func SetApiserverUnhealthyMetrics

func SetApiserverUnhealthyMetrics(nodeName string)

func SetExternalDNSHealthyMetrics added in v1.12.1

func SetExternalDNSHealthyMetrics(nodeName string, latency float64)

func SetExternalDNSUnhealthyMetrics added in v1.12.1

func SetExternalDNSUnhealthyMetrics(nodeName string)

func SetExternalPingMetrics

func SetExternalPingMetrics(srcNodeName, srcNodeIP, srcPodIP, targetAddress string, latency float64, lost int)

func SetInternalDNSHealthyMetrics added in v1.12.1

func SetInternalDNSHealthyMetrics(nodeName string, latency float64)

func SetInternalDNSUnhealthyMetrics added in v1.12.1

func SetInternalDNSUnhealthyMetrics(nodeName string)

func SetNodePingMetrics

func SetNodePingMetrics(srcNodeName, srcNodeIP, srcPodIP, targetNodeName, targetNodeIP string, latency float64, lost, total int)

func SetOvnControllerDownMetrics

func SetOvnControllerDownMetrics(nodeName string)

func SetOvnControllerUpMetrics

func SetOvnControllerUpMetrics(nodeName string)

func SetOvsDownMetrics

func SetOvsDownMetrics(nodeName string)

func SetOvsUpMetrics

func SetOvsUpMetrics(nodeName string)

func SetPodPingMetrics

func SetPodPingMetrics(srcNodeName, srcNodeIP, srcPodIP, targetNodeName, targetNodeIP, targetPodIP string, latency float64, lost, total int)

func StartPinger

func StartPinger(config *Configuration, stopCh <-chan struct{})

Types

type Chassis added in v1.12.17

type Chassis struct {
	UUID [2]string `json:"_uuid"`
}

Chassis represents a row in the Chassis table.

type ChassisResponse added in v1.12.17

type ChassisResponse struct {
	Rows []Chassis `json:"rows"`
}

ChassisResponse represents the structure of the OVSDB query response.

type Configuration

type Configuration struct {
	KubeConfigFile     string
	KubeClient         kubernetes.Interface
	Port               int32
	DaemonSetNamespace string
	DaemonSetName      string
	Interval           int
	Mode               string
	ExitCode           int
	InternalDNS        string
	ExternalDNS        string
	NodeName           string
	HostIP             string
	PodName            string
	PodIP              string
	PodProtocols       []string
	ExternalAddress    string
	NetworkMode        string
	EnableMetrics      bool

	// Used for OVS Monitor
	PollTimeout                     int
	PollInterval                    int
	SystemRunDir                    string
	DatabaseVswitchName             string
	DatabaseVswitchSocketRemote     string
	DatabaseVswitchFileDataPath     string
	DatabaseVswitchFileLogPath      string
	DatabaseVswitchFilePidPath      string
	DatabaseVswitchFileSystemIDPath string
	ServiceVswitchdFileLogPath      string
	ServiceVswitchdFilePidPath      string
	ServiceOvnControllerFileLogPath string
	ServiceOvnControllerFilePidPath string
	EnableVerboseConnCheck          bool
	TCPConnCheckPort                int32
	UDPConnCheckPort                int32
	TargetIPPorts                   string
}

func ParseFlags

func ParseFlags() (*Configuration, error)

type Exporter

type Exporter struct {
	sync.RWMutex
	Client *ovsdb.OvsClient
	// contains filtered or unexported fields
}

Exporter collects OVS data from the given server and exports them using the prometheus metrics package.

func NewExporter

func NewExporter(cfg *Configuration) *Exporter

NewExporter returns an initialized Exporter.

func (*Exporter) IncrementErrorCounter

func (e *Exporter) IncrementErrorCounter()

IncrementErrorCounter increases the counter of failed queries to OVN server.

func (*Exporter) StartConnection

func (e *Exporter) StartConnection() error

StartConnection connect to database socket

type PortBindingResponse added in v1.12.17

type PortBindingResponse struct {
	Rows []PortBinging `json:"rows"`
}

PortBindingResponse represents the structure of the OVSDB query response.

type PortBinging added in v1.12.17

type PortBinging struct {
	LogicalPort string `json:"logical_port"`
}

Chassis represents a row in the Chassis table.

Jump to

Keyboard shortcuts

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