collector

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package collector includes all individual collectors to gather and export metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewCPUCollector

func NewCPUCollector() (Collector, error)

NewCPUCollector returns a new Collector exposing CPU temperature metrics.

func NewGPUCollector added in v0.6.0

func NewGPUCollector() (Collector, error)

NewGPUCollector returns a new Collector exposing GPU temperature metrics.

func NewTextFileCollector

func NewTextFileCollector() (Collector, error)

NewTextFileCollector returns a new Collector exposing metrics read from files in the given textfile directory.

type RPiCollector

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

RPiCollector implements the prometheus.Collector interface.

func New

func New(filters ...string) (*RPiCollector, error)

New creates a new Raspberry Pi collector.

func (RPiCollector) Collect

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

Collect implements the prometheus.Collector interface.

func (RPiCollector) Describe

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

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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