ovn_exporter

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExporterName

func GetExporterName() string

GetExporterName returns exporter name.

func GetExporterVersion added in v1.0.4

func GetExporterVersion() string

GetExporterVersion return full version info.

func GetRevision

func GetRevision() string

GetRevision returns exporter revision.

func GetVersion

func GetVersion() string

GetVersion returns exporter version.

func GetVersionBuildContext

func GetVersionBuildContext() string

GetVersionBuildContext returns exporter build context.

func GetVersionInfo

func GetVersionInfo() string

GetVersionInfo returns exporter info.

func NewLogger added in v1.0.5

func NewLogger(logLevel string) (log.Logger, error)

NewLogger returns an instance of logger.

Types

type Exporter

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

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

func ExporterPerformClientCalls added in v1.0.2

func ExporterPerformClientCalls(e *Exporter) (*Exporter, error)

ExporterPerformClientCalls creates client connection.

func NewExporter

func NewExporter(opts Options) (*Exporter, error)

NewExporter returns an initialized Exporter.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Exporter) Describe

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

Describe describes all the metrics ever exported by the OVN exporter. It implements prometheus.Collector.

func (*Exporter) GatherMetrics

func (e *Exporter) GatherMetrics()

GatherMetrics collect data from OVN server and stores them as Prometheus metrics.

func (*Exporter) IncrementErrorCounter

func (e *Exporter) IncrementErrorCounter()

IncrementErrorCounter increases the counter of failed queries to OVN server.

func (*Exporter) SetPollInterval

func (e *Exporter) SetPollInterval(i int64)

SetPollInterval sets exporter's polling interval.

type Options

type Options struct {
	Timeout int
	Logger  log.Logger
}

Jump to

Keyboard shortcuts

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