pinger

package
v1.12.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 25 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)

Types

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

Jump to

Keyboard shortcuts

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