collector

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralCollector

type GeneralCollector struct {
	StartTime *prometheus.Desc
	BuildInfo *prometheus.Desc
	// contains filtered or unexported fields
}

GeneralCollector collects metrics, mostly runtime, about this exporter in general.

func NewGeneralCollector

func NewGeneralCollector(logger log.Logger, version string, revision string, buildDate string, goVersion string, started time.Time) *GeneralCollector

NewGeneralCollector returns a new GeneralCollector.

func (*GeneralCollector) Collect

func (c *GeneralCollector) Collect(ch chan<- prometheus.Metric)

Collect is called by the Prometheus registry when collecting metrics.

func (*GeneralCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type OpenVPNCollector

type OpenVPNCollector struct {
	OpenVPNServer         []OpenVPNServer
	LastUpdated           *prometheus.Desc
	ConnectedClients      *prometheus.Desc
	BytesReceived         *prometheus.Desc
	BytesSent             *prometheus.Desc
	ConnectedSince        *prometheus.Desc
	MaxBcastMcastQueueLen *prometheus.Desc
	ServerInfo            *prometheus.Desc
	CollectionError       *prometheus.CounterVec
	// contains filtered or unexported fields
}

OpenVPNCollector collects metrics from openvpn status files

func NewOpenVPNCollector

func NewOpenVPNCollector(logger log.Logger, openVPNServer []OpenVPNServer, collectClientMetrics bool) *OpenVPNCollector

NewOpenVPNCollector returns a new OpenVPNCollector

func (*OpenVPNCollector) Collect

func (c *OpenVPNCollector) Collect(ch chan<- prometheus.Metric)

Collect is called by the Prometheus registry when collecting metrics.

func (*OpenVPNCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type OpenVPNServer added in v1.0.0

type OpenVPNServer struct {
	Name       string
	StatusFile string
	ParseError float64
}

OpenVPNServer contains information of which servers will be scraped

Jump to

Keyboard shortcuts

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