metrics

package module
v0.0.0-...-55df9b7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricServer

func MetricServer()

Types

type MetricCollector

type MetricCollector struct {
	Source     func() *map[string]float64
	SourceDesc ScrapeSourceDesc
	// contains filtered or unexported fields
}

func NewProcessCollector

func NewProcessCollector(source func() *map[string]float64, sourceDesc ScrapeSourceDesc) (*MetricCollector, error)

func (*MetricCollector) Collect

func (p *MetricCollector) Collect(ch chan<- prometheus.Metric)

func (*MetricCollector) Describe

func (p *MetricCollector) Describe(ch chan<- *prometheus.Desc)

type MetricLauncher

type MetricLauncher struct {
	Data       *map[string]float64
	MetricDesc *ScrapeSourceDesc
}

func (MetricLauncher) Serve

func (m MetricLauncher) Serve(config *PromConfig)

type Metrics

type Metrics struct {
	CpuTemp    prometheus.Gauge
	HdFailures *prometheus.CounterVec
}

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

type PromConfig

type PromConfig struct {
	MetricsPath        string
	ListenAddress      string
	WebListenAddresses []string
	WebSystemdSocket   bool
	WebConfigFile      string
}

type ScrapeSource

type ScrapeSource func()

type ScrapeSourceDesc

type ScrapeSourceDesc map[string]*prometheus.Desc

type Source

type Source struct {
	Name  string
	Value int
}

Jump to

Keyboard shortcuts

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