collector

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChronyCollectorConfig added in v0.8.0

type ChronyCollectorConfig struct {
	// Address is the Chrony server UDP command port.
	Address string
	// Timeout configures the socket timeout to the Chrony server.
	Timeout time.Duration

	// ChmodSocket will set the unix datagram socket to mode `0666` when true.
	ChmodSocket bool
	// DNSLookups will reverse resolve IP addresses to names when true.
	DNSLookups bool

	// CollectSources will configure the exporter to collect `chronyc sources`.
	CollectSources bool
	// CollectTracking will configure the exporter to collect `chronyc tracking`.
	CollectTracking bool
	// CollectServerstats will configure the exporter to collect `chronyc serverstats`.
	CollectServerstats bool
}

ChronyCollectorConfig configures the exporter parameters.

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter collects chrony stats from the given server and exports them using the prometheus metrics package.

func NewExporter

func NewExporter(conf ChronyCollectorConfig, logger log.Logger) 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 implements prometheus.Collector.

Jump to

Keyboard shortcuts

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