pinger

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 24 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

func SetExternalDnsHealthyMetrics(nodeName string, latency float64)

func SetExternalDnsUnhealthyMetrics

func SetExternalDnsUnhealthyMetrics(nodeName string)

func SetExternalPingMetrics

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

func SetInternalDnsHealthyMetrics

func SetInternalDnsHealthyMetrics(nodeName string, latency float64)

func SetInternalDnsUnhealthyMetrics

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, e *Exporter)

Types

type Configuration

type Configuration struct {
	KubeConfigFile     string
	KubeClient         kubernetes.Interface
	Port               int
	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

	// 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
}

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